Skip to content

Instantly share code, notes, and snippets.

@lakshmanok
Last active October 6, 2016 18:24
Show Gist options
  • Save lakshmanok/fd1df45a45dd874c165337a7f12e8e57 to your computer and use it in GitHub Desktop.
Save lakshmanok/fd1df45a45dd874c165337a7f12e8e57 to your computer and use it in GitHub Desktop.
Random Sampling in BigQuery
SELECT
date,
airline,
departure_airport,
departure_schedule,
arrival_airport,
arrival_delay
FROM
[bigquery-samples:airline_ontime_data.flights]
WHERE
RAND() < 0.8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment