Created
July 21, 2022 10:22
-
-
Save janbenetka/fd6123f89c6d6eeab90ea16293830c01 to your computer and use it in GitHub Desktop.
[Random sample in BQ] #bigquery #random
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT * FROM subset | |
WHERE RAND() < 1e6 / (SELECT COUNT(*) FROM subset) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment