SQL - Vertica: How to generate daily rows with most previous date data
问题 I have a base table like below: score_upd (Upd_dt,Url,Score) AS ( SELECT DATE '2019-07-26','A','x' UNION ALL SELECT DATE '2019-07-26','B','alpha' UNION ALL SELECT DATE '2019-08-01','A','y' UNION ALL SELECT DATE '2019-08-01','B','beta' UNION ALL SELECT DATE '2019-08-03','A','z' UNION ALL SELECT DATE '2019-08-03','B','gamma' ) Upd_dt URL Score 2019-07-26 A x 2019-07-26 B alpha 2019-08-01 A y 2019-08-01 B beta 2019-08-03 A z 2019-08-03 B gamma And I want to create a table in daily-url level,