⌘K ctrl+k
Search Shortcut cmd + k | ctrl + k
DuckDB 1.3 ドキュメント 全文検索
per page, with , order by , clip by
Results of 1 - 1 of about 1 for shares (0.001 sec.)
AsOf Join – DuckDB 9414
This page is for DuckDB 1.3, which is outdated. Switch to the current version . Search Shortcut cmd + k | ctrl + k Installation Documentation Getting Started Connect Overview Concurrency Data Import Overview Data Sources CSV Files Overview ... 00 2 GOOG 2001-01-01 00:02:00 3 We have another table containing portfolio holdings at various points in time: ticker when shares APPL 2000-12-31 23:59:30 5.16 APPL 2001-01-01 00:00:30 2.94 APPL 2001-01-01 00:01:30 24.13 GOOG 2000-12-31 23:59:30 9.33 G ... by finding the most recent price before the holding's timestamp by using an AsOf Join: SELECT h.ticker , h.when , price * shares AS value FROM holdings h ASOF JOIN prices p ON h.ticker = p.ticker AND h.when >= p.when ; This attaches the value of the h ... e missing times on the right. To handle this situation, you can use an outer AsOf Join: SELECT h.ticker , h.when , price * shares AS value FROM holdings h ASOF LEFT JOIN prices p ON h.ticker = p.ticker AND h.when >= p.when ORDER BY ALL ; As you might e ...
https://man.mtool.work/duckdb/1.3/guides/sql_features/asof_join.html
PREV 1 NEXT
DuckDB 1.3 Documentation / man.mtool.work