Skip to content

Instantly share code, notes, and snippets.

@ParzivalWins
Created November 6, 2020 23:59
Show Gist options
  • Save ParzivalWins/a090843e50854ab9e78596588950d2c5 to your computer and use it in GitHub Desktop.
Save ParzivalWins/a090843e50854ab9e78596588950d2c5 to your computer and use it in GitHub Desktop.
The following query retrieves the recent high and low temperature readings for New York City, converted from celsius to fahrenheit temperatures, along with the latitude and longitude for the readings:
select (v:main.temp_max - 273.15) * 1.8000 + 32.00 as temp_max_far,
(v:main.temp_min - 273.15) * 1.8000 + 32.00 as temp_min_far,
cast(v:time as timestamp) time,
v:city.coord.lat lat,
v:city.coord.lon lon,
v
from snowflake_sample_data.weather.weather_14_total
where v:city.name = 'New York'
and v:city.country = 'US'
order by time desc
limit 10;
@ParzivalWins
Copy link
Author

Commenting here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment