Guest User

Untitled

a guest
Apr 23rd, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. select p.email email, max(p.firstname) firstname,max(p.lastname) lastname
  2. from abc p, xyz c
  3. where p.companyid=c.companyid
  4. and c.company!=''
  5. and locationid in (
  6. select locationid
  7. from mno tr
  8. where 1=1
  9. AND tr.inc in (7,8,9)
  10. AND tr.topic in( 'Callidus Cloud')
  11. AND tr.inc IS NOT NULL
  12. order by inc desc
  13. )
  14. AND c.crange IN ('100-249','250-499','500-999','1000-4999'
  15. ,'5000-9999','50000-100000','>100000')
  16. group by p.email limit 7 offset 0
Add Comment
Please, Sign In to add comment