Guest User

Untitled

a guest
Jan 5th, 2018
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. select banner_id as banner,
  2. (select count(ah_type) from advertisement_hits where ah_type='view' and banner_id = banner) as views,
  3. (select count(ah_type) as clicks from advertisement_hits where ah_type='click' and banner_id = banner) as clicks
  4. from advertisement_hits group by banner;
Add Comment
Please, Sign In to add comment