3 comments on “Google BigQuery

  1. Pingback: Google BigQuery | No God but God Muhammad is th...

  2. Reblogged this on Engineering WordPress with Barki Mustapha and commented:

    SELECT MonthYear MonthYear, INTEGER(norm*100000)/1000 Percent
    FROM (
    SELECT ActionGeo_CountryCode, EventRootCode, MonthYear, COUNT(1) AS c, RATIO_TO_REPORT(c) OVER(PARTITION BY MonthYear ORDER BY c DESC) norm FROM [gdelt-bq:full.events]
    GROUP BY ActionGeo_CountryCode, EventRootCode, MonthYear
    )
    WHERE ActionGeo_CountryCode=’UP’ and EventRootCode=’14’
    ORDER BY ActionGeo_CountryCode, EventRootCode, MonthYear;

    Like

  3. SELECT MonthYear MonthYear, INTEGER(norm*100000)/1000 Percent
    FROM (
    SELECT ActionGeo_CountryCode, EventRootCode, MonthYear, COUNT(1) AS c, RATIO_TO_REPORT(c) OVER(PARTITION BY MonthYear ORDER BY c DESC) norm FROM [gdelt-bq:full.events]
    GROUP BY ActionGeo_CountryCode, EventRootCode, MonthYear
    )
    WHERE ActionGeo_CountryCode=’UP’ and EventRootCode=’14’
    ORDER BY ActionGeo_CountryCode, EventRootCode, MonthYear;

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s