2021. ápr 23.

Import Sheets to BigQuery

írta: dataanalyticsdemo
Import Sheets to BigQuery

Tovább Szólj hozzá

SQL Bigquery Google Sheets

2021. ápr 19.

Transactions by browser in July 2017

írta: dataanalyticsdemo
Transactions by browser in July 2017

Analytics sample in BQ

SELECTdevice.browser,SUM ( totals.transactions ) AS total_transactionsFROM `bigquery-public-data.google_analytics_sample.ga_sessions_*`WHERE_TABLE_SUFFIX BETWEEN '20170701' AND '20170731'GROUP BY device.browserHAVING SUM ( totals.transactions ) > 0 ORDER BYtotal_transactions DESC

Tovább Szólj hozzá

public SQL Analytics Bigquery TABLE SUFFIX

2021. már 30.

Texas new COVID cases until 03.29

írta: dataanalyticsdemo
Texas new COVID cases until 03.29

 with prep as (SELECT *, LAG(confirmed_cases, 1)OVER (PARTITION BY state_name ORDER BY date ASC) AS prev_dayFROM `bigquery-public-data.covid19_nyt.us_states`where upper(state_name) = 'TEXAS'and date >= '2021-03-01'order by date asc) select date, confirmed_cases - prev_day as new_cases --since…

Tovább Szólj hozzá

public SQL COVID-19 Bigquery

2021. már 03.

SQL Bigquery tidbits:Months to be ordered correctly

írta: dataanalyticsdemo
SQL Bigquery tidbits:Months to be ordered correctly

I love it, when I want to chronologically sort year & months formatted like 2016-1, 2016-2..2016-10 and the result is like: 2016-1, 2016-10, 2016-2. This needs to stop. with prep as (SELECT * ,cast(concat(cast(year as string), '-', case when length(cast(month as string)) = 1 then…

Tovább Szólj hozzá

public SQL Cases Bigquery

2021. már 02.

SQL Bigquery tidbits: Popular names 1910-2013 database

írta: dataanalyticsdemo
SQL Bigquery tidbits: Popular names 1910-2013 database

The table: Let's start with most popular name throughout all the years: SELECT A.*, B.* FROM `bigquery-public-data.usa_names.usa_1910_2013` A inner join (select name as name2, sum(number) as res from `bigquery-public-data.usa_names.usa_1910_2013` group by name order by sum(number) desc) B on…

Tovább Szólj hozzá

public SQL Bigquery

2020. nov 11.

Google Bigquery: Public Covid-19 & GA dataset analysis

írta: dataanalyticsdemo
Google Bigquery: Public Covid-19 & GA dataset analysis

The situation: let's say I want to know the number of cases in Italy by province first. The dataset: Warm-Up queries: Now, to get the same result with Analytic function, displaying the total sum of the region in every row.  Okay, but this is not so much fun when you have only a few…

Tovább Szólj hozzá

public SQL Bigquery

süti beállítások módosítása