⌘K ctrl+k
Search Shortcut cmd + k | ctrl + k
DuckDB 2.0 ドキュメント 全文検索
per page, with , order by , clip by
Results of 1 - 10 of about 41 for interval (0.002 sec.)
Interval Functions 13770
This section describes functions and operators for examining and manipulating INTERVAL values. Interval Operators The table below shows the available mathematical operators for INTERVAL types. Operator Description Example Result + Addition ... of an INTERVAL INTERVAL 1 HOUR + INTERVAL 5 HOUR INTERVAL 6 HOUR + Addition to a DATE DATE '1992-03-22' + INTERVAL 5 DAY 1992-03-27 00:00 ... :00 + Addition to a TIMESTAMP TIMESTAMP '1992-03-22 01:02:03' + INTERVAL 5 DAY 1992-03-27 01:02:03 + Addition to a TIME TIME '01:02:03' + INTERVAL 5 HOUR 06:02:03 - Subtraction of an INTERVAL INT ... ERVAL 5 HOUR - INTERVAL 1 HOUR INTERVAL 4 HOUR - Subtraction from a DATE DATE '1992-03-27' - INTERVAL 5 DAY 1992-03-22 00:00:00 - Subtraction from ...
https://man.mtool.work/duckdb/2.0/sql/functions/interval.html
Interval Type 12900
INTERVAL s represent periods of time that can be added to or subtracted from DATE , TIMESTAMP , TIMESTAMPTZ , or TIME values. Name Description INTERVAL Period of time An INTERVAL can be constructed by providing amounts together with units. ... months , days , or microseconds are converted to equivalent amounts in the next smaller of these three basis units. SELECT INTERVAL 1 YEAR, -- single unit using YEAR keyword; stored as 12 months INTERVAL (random() * 10) YEAR, -- parentheses necessary for ... variable amounts; -- stored as integer number of months INTERVAL '1 month 1 day', -- string type necessary for multiple units; stored as (1 month, 1 day) '16 months'::INTERVAL, -- string ... cast supported; stored as 16 months '48:00:00'::INTERVAL, -- HH::MM::SS string supported; stored as (48 * 60 * 60 * 1e6 microseconds) ; Warning Decimal values are truncated to int ...
https://man.mtool.work/duckdb/2.0/sql/data_types/interval.html
Timestamp Functions 10444
This section describes functions and operators for examining and manipulating TIMESTAMP values . See also the related TIMESTAMPTZ functions . Timestamp Operators The table below shows the available mathematical operators for TIMESTAMP types ... . Operator Description Example Result + addition of an INTERVAL TIMESTAMP '1992-03-22 01:02:03' + INTERVAL 5 DAY 1992-03-27 01:02:03 - subtraction of TIMESTAMP s TIMESTAMP '1992-03-27' - ... TIMESTAMP '1992-03-22' 5 days - subtraction of an INTERVAL TIMESTAMP '1992-03-27 01:02:03' - INTERVAL 5 DAY 1992-03-22 01:02:03 Adding to or subtracting from infinite values produce ... act arguments, resulting in the time difference between the two timestamps. age(timestamp) Subtract from current_date. ago(interval) Subtracts an interval from the current timestamp. century(timestamp) Extracts the century of a timestamp. current_localti ...
https://man.mtool.work/duckdb/2.0/sql/functions/timestamp.html
Date Functions 10164
This section describes functions and operators for examining and manipulating DATE values. Date Operators The table below shows the available mathematical operators for DATE types. Operator Description Example Result + addition of days (int ... egers) DATE '1992-03-22' + 5 1992-03-27 + addition of AN INTERVAL DATE '1992-03-22' + INTERVAL 5 DAY 1992-03-27 00:00:00 + addition of a variable INTERVAL SELECT DATE '1992-03-22' + INTERV ... 03-27 00:00:00 and 1992-04-02 00:00:00 - subtraction of DATE s DATE '1992-03-27' - DATE '1992-03-22' 5 - subtraction of an INTERVAL DATE '1992-03-27' - INTERVAL 5 DAY 1992-03-22 00:00:00 - subtraction of a variable INTERVAL SELECT DATE '1992-03-27' - INT ... types. Dates can also be manipulated with the timestamp functions through type promotion. Name Description date_add(date, interval) Add the interval to the date and return a DATETIME value. date_diff(part, startdate, enddate) The number of part boundari ...
https://man.mtool.work/duckdb/2.0/sql/functions/date.html
Timestamp with Time Zone Functions 9574
This section describes functions and operators for examining and manipulating TIMESTAMP WITH TIME ZONE (or TIMESTAMPTZ ) values . See also the related TIMESTAMP functions . Time zone support is provided by the built-in ICU extension . In th ... rs for TIMESTAMP WITH TIME ZONE values provided by the ICU extension. Operator Description Example Result + addition of an INTERVAL TIMESTAMPTZ '1992-03-22 01:02:03' + INTERVAL 5 DAY 1992-03-27 01:02:03 - subtraction of TIMESTAMPTZ s TIMESTAMPTZ '1992-03 ... -27' - TIMESTAMPTZ '1992-03-22' 5 days - subtraction of an INTERVAL TIMESTAMPTZ '1992-03-27 01:02:03' - INTERVAL 5 DAY 1992-03-22 01:02:03 Adding to or subtracting from infinite values produ ... ces the same infinite value. Addition and subtraction of intervals follows the semantics of the ICU Calendar add function , which the icu extension implements natively since DuckDB 2.0. Fo ...
https://man.mtool.work/duckdb/2.0/sql/functions/timestamptz.html
Merge Statement for SCD Type 2 8859
This is a practical, step-by-step guide to using DuckDB's MERGE statement (introduced in v1.4.0) to perform upserts and build Slowly Changing Dimension Type 2 (SCD Type 2) tables . Type 2 SCDs let you keep full historical versions of record ... d_date DATE, is_current BOOLEAN ); INSERT INTO incoming_ducks VALUES (101, 'Quackers', 'Mallard', 'Pond B', CURRENT_DATE - INTERVAL '1 day', NULL, true), (102, 'Waddles', 'Pekin', 'Pond A', CURRENT_DATE - INTERVAL '1 day', NULL, true), (104, 'Splash', 'M ... uscovy', 'Pond C', CURRENT_DATE - INTERVAL '1 day', NULL, true), (105, 'Puddles', 'Indian Runner', 'Relocated', CURRENT_DATE - INTERVAL '1 day', NULL, true); Step 2: ... START 1; INSERT INTO master_ducks VALUES (nextval('duck_record_seq'), 101, 'Quackers', 'Mallard', 'Pond A', CURRENT_DATE - INTERVAL '2 days', NULL, true), (nextval('duck_record_seq'), 102, 'Waddles', 'Pekin', 'Pond A', CURRENT_DATE - INTERVAL '2 days', N ...
https://man.mtool.work/duckdb/2.0/guides/sql_features/merge.html
Time Functions 8548
This section describes functions and operators for examining and manipulating TIME values . Time Operators The table below shows the available mathematical operators for TIME types. Operator Description Example Result + addition of an INTERVAL ... VAL TIME '01:02:03' + INTERVAL 5 HOUR 06:02:03 - subtraction of an INTERVAL TIME '06:02:03' - INTERVAL 5 HOUR 01:02:03 Time Functions The table below sho ... . date_part(part, time) Get subfield (equivalent to extract ). date_sub(part, starttime, endtime) The signed length of the interval between starttime and endtime , truncated to whole multiples of part . extract(part FROM time) Get subfield from a time. g ... 21:13') | | Result | 21 | | Alias | datepart | date_sub(part, starttime, endtime) | Description | The signed length of the interval between starttime and endtime , truncated to whole multiples of part . | | Example | date_sub('hour', TIME '01:02:03', TIM ...
https://man.mtool.work/duckdb/2.0/sql/functions/time.html
Values 8361
The value class represents a single value of any type. API Reference Overview void duckdb_destroy_value ( duckdb_value * value ); duckdb_value duckdb_create_varchar ( const char * text ); duckdb_value duckdb_create_varchar_length ( const ch ... db_timestamp_ms input ); duckdb_value duckdb_create_timestamp_ns ( duckdb_timestamp_ns input ); duckdb_value duckdb_create_interval ( duckdb_interval input ); duckdb_value duckdb_create_blob ( const uint8_t * data , idx_t length ); duckdb_value duckdb_cr ... _ms duckdb_get_timestamp_ms ( duckdb_value val ); duckdb_timestamp_ns duckdb_get_timestamp_ns ( duckdb_value val ); duckdb_interval duckdb_get_interval ( duckdb_value val ); duckdb_logical_type duckdb_get_value_type ( duckdb_value val ); duckdb_blob duck ... t : The duckdb_timestamp_ns value Return Value The value. This must be destroyed with duckdb_destroy_value . duckdb_create_interval Creates a value from an interval Syntax duckdb_value duckdb_create_interval ( duckdb_interval input ); Parameters input : ...
https://man.mtool.work/duckdb/2.0/clients/c/value.html
Window Functions 8159
DuckDB supports window functions , which can use multiple rows to calculate a value for each row. Window functions are blocking operators , i.e., they require their entire input to be buffered, making them one of the most memory-intensive o ... an use this window query: SELECT "Plant", "Date", avg("MWh") OVER ( PARTITION BY "Plant" ORDER BY "Date" ASC RANGE BETWEEN INTERVAL 3 DAYS PRECEDING AND INTERVAL 3 DAYS FOLLOWING) AS "MWh 7-day Moving Average" FROM "Generation History" ORDER BY 1, 2; Thi ... vent, date, athlete, avg(time) OVER w AS recent, FROM results WINDOW w AS ( PARTITION BY event ORDER BY date RANGE BETWEEN INTERVAL 10 DAYS PRECEDING AND INTERVAL 10 DAYS FOLLOWING EXCLUDE CURRENT ROW ) ORDER BY event, date, athlete; There are four optio ... h 7-day Moving Maximum" FROM "Generation History" WINDOW seven AS ( PARTITION BY "Plant" ORDER BY "Date" ASC RANGE BETWEEN INTERVAL 3 DAYS PRECEDING AND INTERVAL 3 DAYS FOLLOWING) ORDER BY 1, 2; The three window functions will also share the data layout, ...
https://man.mtool.work/duckdb/2.0/sql/functions/window_functions.html
UI Extension 8128
The ui extension adds a user interface for your local DuckDB instance. Usage To start the UI from the command line: duckdb -ui To start the UI from SQL: CALL start_ui(); Running either of these will open the UI in your default browser. The ... you load into DuckDB. Because of this risk, the setting is only respected if allow_unsigned_extensions is enabled. Polling Interval The UI extension polls for some information on a background thread. It watches for changes to the list of attached databas ... es, and it detects when you connect to MotherDuck. These checks take very little time to complete, so the default polling interval is short (284 milliseconds). You can configure it with a SQL command like: SET ui_polling_interval = 284; The environment ... variable ui_polling_interval can also be used. Setting the polling interval to 0 will disable polling entirely. This is not recommended, as the list of ...
https://man.mtool.work/duckdb/2.0/core_extensions/ui.html
PREV 1 2 3 4 5 NEXT
DuckDB 2.0 Documentation / man.mtool.work