Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CREATE TABLE sandbox.d_camera_tmp_new AS
- WITH a AS (
- SELECT d.*. g.camera_district, g.camera_area FROM sandbox.d_camera_tmp d LEFT JOIN sandbox.asana_codd_geocoder g
- ON d.camera_latitude = g.camera_latitude AND d.camera_longitude = g.camera_longitude
- ), b AS (
- SELECT a.*, c.v_speed_limit AS speed_limit FROM codd_data.codd c LEFT JOIN a ON a.v_gps_x = c.camera_latitude AND a.v_gps_y = c.camera_longitude
- ) res AS (
- SELECT * FROM b GROUP BY
- ) SELECT * FROM res
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement