daily pastebin goal
71%
SHARE
TWEET

Untitled

a guest May 17th, 2018 75 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. WITH actions AS (
  2.   SELECT
  3.     submission_date_s3,
  4.    
  5.     split_part(locale, '-', 1) as locale,
  6.     e.t.timestamp,
  7.     e.t.category,
  8.     e.t.method,
  9.     e.t.object,
  10.     e.t.value
  11.   FROM
  12.     telemetry_mobile_event_parquet
  13.   CROSS JOIN
  14.     UNNEST(events) AS e(t)
  15.   WHERE
  16.     submission_date_s3 >= '20180125' AND app_name = 'Fennec' AND os = 'iOS'
  17.     AND e.t.category = 'action' AND e.t.method = 'scan'
  18. )
  19.  
  20. SELECT
  21.   submission_date_s3,
  22.   object,
  23.   COUNT(*) as count
  24. FROM
  25.   actions
  26. GROUP BY
  27.   submission_date_s3, object
  28. ORDER BY
  29.   submission_date_s3 ASC
RAW Paste Data
Top