Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT
- g.gid as gid,
- c.title as title,
- c.category as category,
- c.url_source as url_source,
- c.url as url,
- c.language as language,
- c.author as author,
- c.display_regions as regions,
- c.video_duration as video_duration,
- c.mp_id as media_platform,
- SUM(g.all_click_count) AS click,
- SUM(g.all_impression_count) AS impression,
- SUM(g.all_click_count) / SUM(g.all_impression_count) * 100 AS ctr,
- SUM(g.share_count) AS share,
- SUM(g.digg_count) AS digg,
- SUM(g.bury_count) AS bury,
- SUM(g.favorite_count) AS favorite
- FROM
- `i18n_pgc_dw_sg`.log_v3_item_stats g
- LEFT JOIN `default`.crawl_group_stats_all c ON g.gid = c.gid
- WHERE
- (
- g.`date` BETWEEN '20180301'
- AND '20180331'
- )
- AND g.app_id IN (1245, 1124, 1125, 1194)
- AND c.language = 'id'
- AND c.composition in (72, 256, 264, 384)
- GROUP BY g.gid, c.title, c.category, c.url_source, c.url, c.language, c.author, c.display_regions, c.video_duration, c.mp_id
- ORDER BY click DESC
- LIMIT 5000
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement