Guest User

Untitled

a guest
May 25th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. select count(*)from(select tel_num, manufacturer from abcd
  2. where manufacturer='big_company'
  3. and tel_num is not null)pqr
  4.  
  5. select cast (count (*)as bigint) from (select a.tel_num, b.postpaid from
  6. abcd as a inner join wxyz as b on a.tel_num=b.tel_num
  7. where a.manufacturer='big_company'
  8. and b.postpaid=1) xyz
  9.  
  10. select cast (count (*)as bigint)
  11. from abcd a
  12. where exists (select 1 from wxyz b
  13. where a.tel_num=b.tel_num and b.postpaid=1)
  14. and a.manufacturer='big_company'
Add Comment
Please, Sign In to add comment