Forgot to save code for main datamart

This commit is contained in:
wes
2024-05-20 13:37:29 -04:00
parent 1678a2f5a6
commit 9b86647b1c
+1 -1
View File
@@ -47,6 +47,6 @@ JOIN knoebels."LZ_attractions_io_poi" AS poi ON livedata._id = poi._id
-- This is my own "master" file for ride data, for data points not served by the attractions.io API. Handstamp inclusions/exclusions, capacity, duration, etc. -- This is my own "master" file for ride data, for data points not served by the attractions.io API. Handstamp inclusions/exclusions, capacity, duration, etc.
JOIN knoebels.ride_master rm ON livedata._id = rm.attractions_dot_io_id JOIN knoebels.ride_master rm ON livedata._id = rm.attractions_dot_io_id
-- fetch most recent price data, scraped from webpage, this can differ from the POI data used by the app -- fetch most recent price data, scraped from webpage, this can differ from the POI data used by the app
JOIN (SELECT row_number() OVER (PARTITION BY ride ORDER BY time_stamp DESC) AS row_number, * FROM knoebels.ride_data_in) prices ON prices.ride = rm.ride and prices.row_number = 1 LEFT JOIN (SELECT row_number() OVER (PARTITION BY ride ORDER BY time_stamp DESC) AS row_number, * FROM knoebels.ride_data_in) prices ON prices.ride = rm.ride and prices.row_number = 1
--ORDER BY name, time_stamp --ORDER BY name, time_stamp
--where name = 'Sklooosh' --where name = 'Sklooosh'