emergingbytes.com Technology blog for data warehousing, business intelligence, iPhone Apps Development, Android Apps development and facebook applications

4Oct/171

Google Cloud BigQuery Selecting Random Sample

Following is the sudo code to select random rows in Google Cloud BigQuery:

SELECT *
FROM {TABLE}
WHERE RAND() < {number of random rows}/{total rows}

Filed under: BigQuery, Cloud 1 Comment
9Jun/170

Google BigQuery Group_Concat in Standard SQL

Google BigQuery provides a function (Group_Concat) to merge text in rows into one single row. It is an Aggregation Function and is supported in Legacy SQL.

It's equivalent in Standard SQL is String_Agg.