Skip to content

Instantly share code, notes, and snippets.

@Mistobaan
Last active June 23, 2020 20:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Mistobaan/c32105f7eede50b9e7a710fc3bbe0f65 to your computer and use it in GitHub Desktop.
Save Mistobaan/c32105f7eede50b9e7a710fc3bbe0f65 to your computer and use it in GitHub Desktop.
DECLARE SAMPLE_SIZE INT64 DEFAULT 5;
SELECT *
FROM
BREATHE.ncbi_xml
WHERE
RAND() < SAMPLE_SIZE/(SELECT COUNT(*) FROM `BREATHE.ncbi_xml`)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment