⌘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 ticker (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 ... . Portfolio Example Data Set Let's start with a concrete example. Suppose we have a table of stock prices with timestamps: ticker when price APPL 2001-01-01 00:00:00 1 APPL 2001-01-01 00:01:00 2 APPL 2001-01-01 00:02:00 3 MSFT 2001-01-01 00:00:00 1 MSF ... 01-01 00:01: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: ... ding at that point in time 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 a ...
https://man.mtool.work/duckdb/1.3/guides/sql_features/asof_join.html
PREV 1 NEXT
DuckDB 1.3 Documentation / man.mtool.work