Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- select count(*)from(select tel_num, manufacturer from abcd
- where manufacturer='big_company'
- and tel_num is not null)pqr
- select cast (count (*)as bigint) from (select a.tel_num, b.postpaid from
- abcd as a inner join wxyz as b on a.tel_num=b.tel_num
- where a.manufacturer='big_company'
- and b.postpaid=1) xyz
- select cast (count (*)as bigint)
- from abcd a
- where exists (select 1 from wxyz b
- where a.tel_num=b.tel_num and b.postpaid=1)
- and a.manufacturer='big_company'
Add Comment
Please, Sign In to add comment