Advertisement
adzhanihani

(Real) ALL DATA - NON PGC (BUZZ UP)

Feb 25th, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MySQL 0.63 KB | None | 0 0
  1. SELECT
  2.     g.app_id as app_id,
  3.     COUNT(DISTINCT g.gid) as gids,
  4.     SUM(g.pan_click_count) AS click,
  5.     SUM(g.client_impression_count) AS impression,
  6.     SUM(g.pan_click_count) / SUM(g.client_impression_count) AS ctr,
  7.     SUM(g.share_count) AS share,
  8.     SUM(g.digg_count) AS digg,
  9.     SUM(g.bury_count) AS bury,
  10.     SUM(g.favorite_count) AS favorite
  11. FROM
  12.     i18n_pgc_dw_sg.log_v3_item_stats g
  13.     LEFT JOIN `default`.crawl_group_stats_all c ON g.gid = c.gid
  14. WHERE
  15.     (
  16.         g.`date` BETWEEN '20180129' AND '20180204'
  17.     )
  18.     AND g.app_id = 1194
  19.     AND c.language = 'id'
  20. GROUP BY g.app_id
  21. ORDER BY click DESC
  22. LIMIT 5
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement