SELECT name, value/10 AS min_temperature, latitude, longitudeFROM [bigquery-public-data:ghcn_d.ghcnd_stations] AS stnJOIN [bigquery-public-data:ghcn_d.ghcnd_2016] AS wxON wx.id = stn.idWHERE wx.element = 'TMIN' AND wx.qflag IS NULL AND STRING(wx.date) = '2016-08-15'
SELECT wx.date, wx.value/10.0 AS prcpFROM [bigquery-public-data:ghcn_d.ghcnd_2015] AS wxWHERE id = 'USW00094846' AND qflag IS NULL AND element = 'PRCP'ORDER BY wx.date
wx.value
SELECT wx.date, MAX(prcp) AS prcp, MAX(tmin) AS tmin, MAX(tmax) AS tmax, IF(MAX(haswx) = 'True', 'True', 'False') AS haswxFROM ( SELECT wx.date, IF (wx.element = 'PRCP', wx.value/10, NULL) AS prcp, IF (wx.element = 'TMIN', wx.value/10, NULL) AS tmin, IF (wx.element = 'TMAX', wx.value/10, NULL) AS tmax, IF (SUBSTR(wx.element, 0, 2) = 'WT', 'True', NULL) AS haswx FROM [bigquery-public-data:ghcn_d.ghcnd_2015] AS wx WHERE id = 'USW00094846' AND qflag IS NULL )GROUP BY wx.dateORDER BY wx.date
SELECT REPLACE(date,"-","") AS date, MAX(prcp) AS prcp, MAX(tmin) AS tmin, MAX(tmax) AS tmaxFROM ( SELECT STRING(wx.date) AS date, IF (wx.element = 'PRCP', wx.value/10, NULL) AS prcp, IF (wx.element = 'TMIN', wx.value/10, NULL) AS tmin, IF (wx.element = 'TMAX', wx.value/10, NULL) AS tmax FROM [bigquery-public-data:ghcn_d.ghcnd_2016] AS wx WHERE id = 'USW00094846' AND qflag IS NULL AND value IS NOT NULL AND DATEDIFF(CURRENT_DATE(), date) < 15 )GROUP BY dateORDER BY date ASC
SELECT wx.date, wx.prcp, f.departure_delay, f.arrival_airportFROM ( SELECT STRING(date) AS date, value/10 AS prcp FROM [bigquery-public-data:ghcn_d.ghcnd_2005] WHERE id = 'USW00094846' AND qflag IS NULL AND element = 'PRCP') AS wxJOIN [bigquery-samples:airline_ontime_data.flights] AS fON f.date = wx.dateWHERE f.departure_airport = 'ORD'LIMIT 100
Use promo code NEXT1720 to save $300 off general admission
No comments :
Post a Comment