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,
- case c.mp_id when 54 then 'Y' else 'F' end as is_pgc,
- 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 '20180205' AND '20180211'
- )
- AND g.app_id IN (1245,1124,1125)
- AND c.language = 'id'
- AND c.composition in (256, 264, 384)
- AND c.mp_id = 54
- AND g.media_id IN (6508338496992707595,6512342983285670924,6512718671457027084,6512718876269085707,6512722248049099787,6514167137232225291,6514524053460485132,6515283107216622603)
- 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 1000
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement