Advertisement
bagaspramudita

Kueri PGC Hani Lihat Data Video (BaBe Only)

Feb 14th, 2018
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MySQL 1.27 KB | None | 0 0
  1. SELECT
  2.     g.gid as gid,
  3.     c.title as title,
  4.     c.category as category,
  5.     c.url_source as url_source,
  6.     c.url as url,
  7.     c.language as language,
  8.     c.author as author,
  9.     c.display_regions as regions,
  10.     c.video_duration as video_duration,
  11.     c.mp_id as media_platform,
  12.     case c.mp_id when 54 then 'Y' else 'F' end as is_pgc,
  13.     SUM(g.all_click_count) AS click,
  14.     SUM(g.all_impression_count) AS impression,
  15.     SUM(g.all_click_count) / SUM(g.all_impression_count) * 100 AS ctr,
  16.     SUM(g.share_count) AS share,
  17.     SUM(g.digg_count) AS digg,
  18.     SUM(g.bury_count) AS bury,
  19.     SUM(g.favorite_count) AS favorite
  20. FROM
  21.     i18n_pgc_dw_sg.log_v3_item_stats g
  22.     LEFT JOIN `default`.crawl_group_stats_all c ON g.gid = c.gid
  23. WHERE
  24.     (
  25.         g.`date` BETWEEN '20180205' AND '20180211'
  26.     )
  27.     AND g.app_id IN (1245,1124,1125)
  28.     AND c.language = 'id'
  29.     AND c.composition in (256, 264, 384)
  30.     AND c.mp_id = 54
  31.     AND g.media_id IN (6508338496992707595,6512342983285670924,6512718671457027084,6512718876269085707,6512722248049099787,6514167137232225291,6514524053460485132,6515283107216622603)
  32. 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
  33. ORDER BY click DESC
  34. LIMIT 1000
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement