/* TIMESTAMP example
* Which hours in the day are the most popular for GitHub actions?
* This query converts github_timeline "created_at" date time
* strings to BigQuery TIMESTAMP, and extracts the hour from each.
*/
SELECT
HOUR(TIMESTAMP(created_at)) AS event_create_hour,
COUNT(*) AS event_count
FROM
[publicdata:samples.github_timeline]
GROUP BY
event_create_hour
ORDER BY
event_count DESC; |
For "Add columns to existing BigQuery tables", why not make it part of the standard SQL "Alter table xxxx add xxxxx"?
ReplyDeleteIf you are going to make us specify "big" or "small" joins (by optional "EACH"), can't the default be "big" and we can optionally specify to do the "small" one"? Or better yet, do not add any new syntax/keyword and let the query planner decide which one to use based on table statistics - which is how every DBMS would handle this.
ReplyDeleteAs for the new GROUP EACH BY, why would I ever NOT specify "EACH" here? I don't get it.
(BTW "EACH" is a really bad choice of keyword in both cases, the real meaning is not obvious at all)
Lastly, when are we getting UPDATE? Adding columns to existing tables is nice, but without UPDATE it is not so useful.
Also agree with Schwantners above, ALTER TABLE would be good for adding new columns.
This looks promising for Big Data Analytics.
ReplyDeletehttps://developers.google.com/bigquery/
Big JOIN sounds like great feature. We'll find that very useful at futurelytics!
ReplyDelete