⌘K ctrl+k
Search Shortcut cmd + k | ctrl + k
DuckDB 2.0 ドキュメント 全文検索
per page, with , order by , clip by
Results of 1 - 3 of about 3 for prices (0.001 sec.)
AsOf Join 11663
What is an AsOf Join? Time series data is not always perfectly aligned. Clocks may be slightly off, or there may be a delay between cause and effect. This can make connecting two sets of ordered data challenging. AsOf joins are a tool for s ... implement in standard SQL. Portfolio Example Dataset 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 2 ... 59:30 6.65 DATA 2001-01-01 00:00:30 17.95 DATA 2001-01-01 00:01:30 18.37 To load these tables to DuckDB, run: CREATE TABLE prices AS FROM 'https://duckdb.org/data/prices.csv'; CREATE TABLE holdings AS FROM 'https://duckdb.org/data/holdings.csv'; Inner ... 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 holding at that time to each row: ticker whe ...
https://man.mtool.work/duckdb/2.0/guides/sql_features/asof_join.html
FROM and JOIN Clauses 9077
The FROM clause specifies the source of the data on which the remainder of the query should operate. Logically, the FROM clause is where the query starts execution. The FROM clause can contain a single table, a combination of multiple table ... on when working with temporal or similarly-ordered data is to find the nearest (first) event in a reference table (such as prices). This is called an as-of join: Attach prices to stock trades: SELECT t.*, p.price FROM trades t ASOF JOIN prices p ON t.s ... side row with at most one right side row. It can be specified as an OUTER join to find unpaired rows (e.g., trades without prices or prices which have no trades.) Attach prices or NULLs to stock trades: SELECT * FROM trades t ASOF LEFT JOIN prices p ON ... ribute in the list must be the inequality, which will be greater than or equal to ( >= ): SELECT * FROM trades t ASOF JOIN prices p USING (symbol, "when"); Returns symbol, trades.when, price (but NOT prices.when): If you combine USING with a SELECT * l ...
https://man.mtool.work/duckdb/2.0/sql/query_syntax/from.html
HTTP Parquet Import 7124
To load a Parquet file over HTTP(S), the httpfs extension is required. This can be installed using the INSTALL SQL command. This only needs to be run once. INSTALL httpfs; To load the httpfs extension for usage, use the LOAD SQL command: LO ... OM read_parquet('https://⟨domain⟩/path/to/file.parquet'); For example: SELECT * FROM read_parquet('https://duckdb.org/data/prices.parquet'); Moreover, the read_parquet function itself can also be omitted thanks to DuckDB's replacement scan mechanism : ...
https://man.mtool.work/duckdb/2.0/guides/network_cloud_storage/http_import.html
PREV 1 NEXT
DuckDB 2.0 Documentation / man.mtool.work