Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- select p.email email, max(p.firstname) firstname,max(p.lastname) lastname
- from abc p, xyz c
- where p.companyid=c.companyid
- and c.company!=''
- and locationid in (
- select locationid
- from mno tr
- where 1=1
- AND tr.inc in (7,8,9)
- AND tr.topic in( 'Callidus Cloud')
- AND tr.inc IS NOT NULL
- order by inc desc
- )
- AND c.crange IN ('100-249','250-499','500-999','1000-4999'
- ,'5000-9999','50000-100000','>100000')
- group by p.email limit 7 offset 0
Add Comment
Please, Sign In to add comment