⌘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 167 for number (0.003 sec.)
Date Format Functions 10975
The strftime and strptime functions can be used to convert between DATE / TIMESTAMP values and strings. This is often required when parsing CSV files, displaying output to the user or transferring information between programs. Because there ... tation 1992-03-02 10:30:20 %d Day of the month as a zero-padded decimal. 01, 02, ..., 31 %-d Day of the month as a decimal number. 1, 2, ..., 30 %f Microsecond as a decimal number, zero-padded on the left. 000000 - 999999 %g Millisecond as a decimal nu ... t of the ISO week (see %V ). 0001, 0002, ..., 2013, 2014, ..., 9998, 9999 %H Hour (24-hour clock) as a zero-padded decimal number. 00, 01, ..., 23 %-H Hour (24-hour clock) as a decimal number. 0, 1, ..., 23 %I Hour (12-hour clock) as a zero-padded deci ... mal number. 01, 02, ..., 12 %-I Hour (12-hour clock) as a decimal number. 1, 2, ... 12 %j Day of the year as a zero-padded decimal nu ...
https://man.mtool.work/duckdb/2.0/sql/functions/dateformat.html
Window Functions 9887
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 ... dow functions are available in SQL since SQL:2003 and are supported by major SQL database systems. Examples Generate a row_number column to enumerate rows: SELECT row_number() OVER () FROM sales; Tip If you only need a number for each row in a table, y ... ou can use the rowid pseudocolumn . Generate a row_number column to enumerate rows, ordered by time : SELECT row_number() OVER (ORDER BY time) FROM sales; Generate a row_number col ... umn to enumerate rows, ordered by time and partitioned by region : SELECT row_number() OVER (PARTITION BY region ORDER BY time) FROM sales; Compute the difference between the current and the previous-by- tim ...
https://man.mtool.work/duckdb/2.0/sql/functions/window_functions.html
PostgreSQL Extension Functions 9785
postgres_clear_cache postgres_configure_pool postgres_execute postgres_hstore_get postgres_hstore_to_json postgres_query read_postgres_binary postgres_clear_cache postgres_clear_cache() -> TABLE Clears cached schema entries (like table name ... pool limit), 'wait' (block until available), 'try' (fail immediately if unavailable) max_connections ( UBIGINT ): maximum number of connections that are allowed to be cached in a connection pool for each attached Postgres database. This number can be ... temporary exceeded when parallel scans are used. wait_timeout_millis ( UBIGINT ): maximum number of milliseconds to wait when acquiring a connection from a pool where all available connections are already taken. enable_ ... re not made available to other threads, while still taking the place in the pool. max_lifetime_millis ( UBIGINT ): maximum number of milliseconds the connection can be kept open. This number is checked when the connection is taken from the pool and ret ...
https://man.mtool.work/duckdb/2.0/core_extensions/postgres/functions.html
PostgreSQL Extension Connection Pool 9694
PostgreSQL server spawns a backend process for every incoming client connection. This model leads to the two following points with the postgres extension that can cause performance problems: opening a new connection is relatively expensive ... the number of the connections opened at the same time should not be too high To deal with these points the extensions uses an in-memo ... ry connection pool. With it a limited number of connections are kept open (and idle) after use and can be reused for subsequent queries. Parallel Scans Due to DuckDB's ... postgres extension can open multiple connections even for queries that performs a scan for a single PostgreSQL table. The number of parallel queries running for a single table scan can be as high as the number of worker threads of the current DB insta ...
https://man.mtool.work/duckdb/2.0/core_extensions/postgres/connection_pool.html
Text Functions 8934
Text Functions and Operators This section describes functions and operators for examining and manipulating STRING values . Function Description string[index] Extracts a single character using a (1-based) index . string[begin:end] Extracts a ... lts to 80. base64(blob) Alias for to_base64 . bin(string) Converts the string to binary representation. bit_length(string) Number of bits in a string . char_length(string) Alias for length . character_length(string) Alias for length . chr(code_point) R ... left_grapheme(string, count) Extracts the left-most count grapheme clusters. len(string) Alias for length . length(string) Number of characters in string . length_grapheme(string) Number of grapheme clusters in string . like_escape(string, like_specifi ... left side of the string . characters defaults to space . md5(string) Returns the MD5 hash of the string as a VARCHAR . md5_number(string) Returns the MD5 hash of the string as a HUGEINT . md5_number_lower(string) Returns the lower 64-bit segment of the ...
https://man.mtool.work/duckdb/2.0/sql/functions/text.html
Numeric Functions 8889
Numeric Operators The table below shows the available mathematical operators for numeric types . Operator Description Example Result + Addition 2 + 3 5 - Subtraction 2 - 3 -1 * Multiplication 2 * 3 6 / Float division 5 / 2 2.5 // Division 5 ... atan2(y, x) Computes the inverse tangent of (y, x) . binom(n, k) Computes the binomial coefficient of n and k , i.e., the number of ways to choose k elements from a set of n elements. Returns a HUGEINT . bit_count(x) Returns the number of bits that ar ... e set. cbrt(x) Returns the cube root of the number. ceil(x) Rounds the number up. ceiling(x) Rounds the number up. Alias of ceil . cos(x) Computes the cosine of x . cosh(x) ... , returning a DECIMAL . degrees(x) Converts radians to degrees. divide(x, y) Alias for x // y . even(x) Round to next even number by rounding away from zero. exp(x) Computes e ** x . factorial(x) See the ! operator. Computes the product of the current ...
https://man.mtool.work/duckdb/2.0/sql/functions/numeric.html
Star Expression 8413
Syntax The * expression can be used in a SELECT statement to select all columns that are projected in the FROM clause. SELECT * FROM tbl; TABLE.* and STRUCT.* The * expression can be prepended by a table name to select only columns from tha ... regular star expression, but additionally allows you to execute the same expression on the resulting columns. CREATE TABLE numbers (id INTEGER, number INTEGER); INSERT INTO numbers VALUES (1, 10), (2, 20), (3, NULL); SELECT min(COLUMNS(*)), count(COLUM ... NS(*)) FROM numbers; id number id number 1 10 3 2 SELECT min(COLUMNS(* REPLACE (number + id AS number))), count(COLUMNS(* EXCLUDE (number))) ... FROM numbers; id min((number + id)) id 1 11 3 COLUMNS expressions can also be combined, as long as they contain the same star expressi ...
https://man.mtool.work/duckdb/2.0/sql/expressions/star.html
Timestamp Functions 7834
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 ... stamp() Returns the current timestamp (at the start of the transaction). date_diff(part, starttimestamp, endtimestamp) The number of part boundaries between starttimestamp and endtimestamp , inclusive of the larger timestamp and exclusive of the smalle ... ncate to specified precision . dayname(timestamp) The (English) name of the weekday. epoch_ms(timestamp) Returns the total number of milliseconds since the epoch. epoch_ns(timestamp) Returns the total number of nanoseconds since the epoch. epoch_us(tim ... estamp) Returns the total number of microseconds since the epoch. epoch(timestamp) Returns the total number of seconds since the epoch. extract(field FROM ...
https://man.mtool.work/duckdb/2.0/sql/functions/timestamp.html
Date Part Functions 7789
The date_part , date_trunc and date_diff functions can be used to extract or manipulate parts of temporal types such as TIMESTAMP , TIMESTAMPTZ , DATE and INTERVAL . The parts to be extracted or manipulated are specified by one of the strin ... 27991984.123456 era Gregorian era (CE/AD, BCE/BC) 1 isodow ISO day of the week (Monday = 1, Sunday = 7) 2 isoyear ISO Year number (Starts on Monday of week containing Jan 4th) 2021 julian Julian Day number. 2459430.4998162435 timezone_hour Time zone of ... fset hour portion 0 timezone_minute Time zone offset minute portion 0 timezone Time zone offset in seconds 0 week Week number weeks , w 31 yearweek ISO year and week number in YYYYWW format 202131 Note that the time zone parts are all zero unless a ... ra(date) Calendar era. hour(date) Hours. isodow(date) Numeric ISO weekday (Monday = 1, Sunday = 7). isoyear(date) ISO Year number (Starts on Monday of week containing Jan 4th). julian(date) DOUBLE Julian Day number. microsecond(date) Sub-minute microse ...
https://man.mtool.work/duckdb/2.0/sql/functions/datepart.html
QUALIFY Clause 7744
The QUALIFY clause is used to filter the results of WINDOW functions . This filtering of results is similar to how a HAVING clause filters the results of aggregate functions applied based on the GROUP BY clause . The QUALIFY clause avoids t ... : SELECT schema_name, function_name, -- In this example the function_rank column in the select clause is for reference row_number() OVER (PARTITION BY schema_name ORDER BY function_name) AS function_rank FROM duckdb_functions() QUALIFY row_number() OVE ... function_name) < 3; Filter based on a window function defined in the SELECT clause: SELECT schema_name, function_name, row_number() OVER (PARTITION BY schema_name ORDER BY function_name) AS function_rank FROM duckdb_functions() QUALIFY function_rank < ... : SELECT schema_name, function_name, -- In this example the function_rank column in the select clause is for reference row_number() OVER my_window AS function_rank FROM duckdb_functions() WINDOW my_window AS (PARTITION BY schema_name ORDER BY function_ ...
https://man.mtool.work/duckdb/2.0/sql/query_syntax/qualify.html
PREV 1 2 3 4 5 6 7 8 9 10 NEXT
DuckDB 2.0 Documentation / man.mtool.work