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}

Comments (1) Trackbacks (0)
  1. This can also be used to select one in a thousand rows or 1 in a 100000 rows.


Leave a comment

Security Challenge:
*
Time limit is exhausted. Please reload the CAPTCHA.

No trackbacks yet.