Used Google Cloud Platform BigQuery WebUI to edit SQL queries for GOOGL prediction code competition.
Found some very good examples of BigQuery complex queries here. Really critical findings are:
- Can use
lag(<prop name>, <previous row count) over (ORDER BY <prop name>)
, andlead
to access the window of the result set. - When combined with functions like
AVG(<prop name>)
, makes it really easy to calculate moving averages
SELECT
DATE(S1.date) AS join_date,