title: How does RAND() works in BigQuery?
body: <p>I am trying to find the best sampling practise in BigQuery. My dataset is quite big (11B rows), but the distribution tends to be skewed. So far I've been exploring these two options:</p>
  
  <ol>
  <li>HASHING - where I take the hash of a certain value to select the sample. This is pretty straightforward approach and the mechanics behind it are clear.
  My question is about the second option:</li>
  <li>using RAND() function. I understand how to use it by looking at the BigQuery reference here:
  <a href="https://cloud.google.com/bigquery/docs/reference/legacy-sql#rand" rel="noreferrer">https://cloud.google.com/bigquery/docs/reference/legacy-sql#rand</a>
  However, I have no idea how exactly is this function working.</li>
  </ol>
  
  <p>Can anyone shed some more light on the background stuff that are happening there?</p>
  
  <p>Thanks a lot,
  Gallory</p>