title: Checking if a Coordinate is Within a Range - BigQuery GIS
body: <p>I'm looking at the freely available Solar potential dataset on Google BigQuery that may be found here: <a href="https://bigquery.cloud.google.com/table/bigquery-public-data:sunroof_solar.solar_potential_by_censustract?pli=1&amp;tab=schema" rel="nofollow noreferrer">https://bigquery.cloud.google.com/table/bigquery-public-data:sunroof_solar.solar_potential_by_censustract?pli=1&amp;tab=schema</a></p>
  
  <p>Each record on the table has the following border definitions:
  lat_max - maximum latitude for that region
  lat_min - minimum latitude for that region
  lng_max - maximum longitude for that region
  lng_min - minimum longitude for that region</p>
  
  <p>Now I have a coordinate (lat/lng pair) and I would like to query to see whether or not that coordinate is within the above range. How do I do that with BQ Standard SQL?</p>
  
  <p>I've seen the Geo Functions here: <a href="https://cloud.google.com/bigquery/docs/reference/standard-sql/geography_functions" rel="nofollow noreferrer">https://cloud.google.com/bigquery/docs/reference/standard-sql/geography_functions</a>
  But I'm still not sure how to write this query. </p>
  
  <p>Thanks!</p>