daily pastebin goal
72%
SHARE
TWEET

Untitled

a guest Feb 22nd, 2019 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. AND count_sub>2 AND count_del<=2
  2.    
  3. count_sub = 10
  4. count_del = 4
  5.    
  6. count_sub = 4
  7. count_del = 1
  8.    
  9. WHERE count_sub - count_del > 5
  10.    
  11. SELECT a.id
  12. FROM tbl1 a
  13. INNER JOIN (SELECT id, count_sub - count_del AS diff FROM tbl1) b ON b.id = a.id
  14. WHERE b.diff > 5
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top