Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT
- offer_id,
- sub2,
- sub3,
- sub4,
- count(*) filter (where sub5 != 'csm') as real_clicks,
- count(*) filter (where sub5 = 'csm') as fake_clicks,
- CURRENT_DATE date
- FROM affise.offer_getloyal
- WHERE created_at = :createdAt :: DATE
- GROUP BY offer_id, sub2, sub3, sub4;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement