⌘K ctrl+k
Search Shortcut cmd + k | ctrl + k
DuckDB 2.0 ドキュメント 全文検索
per page, with , order by , clip by
Results of 1 - 8 of about 8 for greatest (0.002 sec.)
Numeric Functions 13158
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 ... s a DOUBLE value. gamma(x) Interpolation of the factorial of x - 1 . Fractional inputs are allowed. gcd(x, y) Computes the greatest common divisor of x and y . greatest_common_divisor(x, y) Computes the greatest common divisor of x and y . greatest(x1, x ... ional inputs are allowed. | | Example | gamma(5.5) | | Result | 52.34277778455352 | gcd(x, y) | Description | Computes the greatest common divisor of x and y . | | Example | gcd(42, 57) | | Result | 3 | greatest_common_divisor(x, y) | Description | Compu ... tes the greatest common divisor of x and y . | | Example | greatest_common_divisor(42, 57) | | Result | 3 | greatest(x1, x2, ...) | Descrip ...
https://man.mtool.work/duckdb/2.0/sql/functions/numeric.html
Date Functions 9832
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 ... . days_in_month(date) The number of days in the month of the given date. extract(part from date) Get subfield from a date. greatest(date, date) The later of two dates. isfinite(date) Returns true if the date is finite, false otherwise. isinf(date) Return ... m date) | Description | Get subfield from a date. | | Example | extract('year' FROM DATE '1992-09-20') | | Result | 1992 | greatest(date, date) | Description | The later of two dates. | | Example | greatest(DATE '1992-09-20', DATE '1992-03-07') | | Resul ... or the day of the week from a date. Functions applied to infinite dates will either return the same infinite dates (e.g., greatest ) or NULL (e.g., date_part ) depending on what “makes sense”. In general, if the function needs to examine the parts of th ...
https://man.mtool.work/duckdb/2.0/sql/functions/date.html
Star Expression 9344
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 ... = 'a' x y a a To combine conditions using the logical OR operator, you can UNPACK the COLUMNS expression into the variadic greatest function. SELECT * FROM ( SELECT 'a', 'a' UNION ALL SELECT 'a', 'b' UNION ALL SELECT 'b', 'b' ) _(x, y) WHERE greatest(UNP ... AS b, true AS c); result 42 Warning In the following example, replacing UNPACK by * results in a syntax error: sql SELECT greatest(UNPACK(COLUMNS(*) + 1)) AS result FROM (SELECT 1 AS a, 2 AS b, 3 AS c); result 4 STRUCT.* The * expression can also be use ...
https://man.mtool.work/duckdb/2.0/sql/expressions/star.html
Timestamp Functions 9001
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 ... mestamp) Returns the total number of seconds since the epoch. extract(field FROM timestamp) Get subfield from a timestamp. greatest(timestamp, timestamp) The later of two timestamps. isfinite(timestamp) Returns true if the timestamp is finite, false othe ... ion functions to get the subfields . Functions applied to infinite dates will either return the same infinite dates (e.g., greatest ) or NULL (e.g., date_part ) depending on what “makes sense”. In general, if the function needs to examine the parts of th ... tion | Get subfield from a timestamp. | | Example | extract('hour' FROM TIMESTAMP '1992-09-20 20:38:48') | | Result | 20 | greatest(timestamp, timestamp) | Description | The later of two timestamps. | | Example | greatest(TIMESTAMP '1992-09-20 20:38:48', ...
https://man.mtool.work/duckdb/2.0/sql/functions/timestamp.html
Timestamp with Time Zone Functions 8675
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 ... ate and time (start of current transaction). get_current_timestamp() Current date and time (start of current transaction). greatest(timestamptz, timestamptz) The later of two timestamps. isfinite(timestamptz) Returns true if the timestamp with time zone ... e and time (start of current transaction). | | Example | get_current_timestamp() | | Result | 2022-10-08 12:44:46.122-07 | greatest(timestamptz, timestamptz) | Description | The later of two timestamps. | | Example | greatest(TIMESTAMPTZ '1992-09-20 20:3 ... : Unknown TimeZone '0200' Infinities Functions applied to infinite dates will either return the same infinite dates (e.g., greatest ) or NULL (e.g., date_part ) depending on what “makes sense”. In general, if the function needs to examine the parts of th ...
https://man.mtool.work/duckdb/2.0/sql/functions/timestamptz.html
Text Functions 7844
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 ... se64 encoded string to a character string ( BLOB ). from_binary(value) Alias for unbin . from_hex(value) Alias for unhex . greatest(arg1, ...) Returns the largest value in lexicographical order. Note that lowercase characters are considered larger than u ... tion | Converts a base64 encoded string to a character string ( BLOB ). | | Example | from_base64('QQ==') | | Result | A | greatest(arg1, ...) | Description | Returns the largest value in lexicographical order. Note that lowercase characters are consider ... ed larger than uppercase characters and collations are not supported. | | Example 1 | greatest(42, 84) | | Result | 84 | | Example 2 | greatest('abc', 'bcd', 'cde', 'EFG') | | Result | cde | hash(value, ...) | Descrip ...
https://man.mtool.work/duckdb/2.0/sql/functions/text.html
SQL Quirks 7356
Like all programming languages and libraries, DuckDB has its share of idiosyncrasies and inconsistencies. Some are vestiges of our feathered friend's evolution; others are inevitable because we strive to adhere to the SQL Standard and speci ... ate IEEE-754 but mean floating point data types have a total order, like all other data types (beware the consequences for greatest / least ). age Function age(x) is current_date - x instead of current_timestamp - x . Another quirk inherited from Postgre ...
https://man.mtool.work/duckdb/2.0/sql/dialect/sql_quirks.html
Aggregate Functions 7012
Examples Produce a single row containing the sum of the amount column: SELECT sum(amount) FROM sales; Produce one row per unique region, containing the sum of amount for each group: SELECT region, sum(amount) FROM sales GROUP BY region; Ret ... le(x, pos) Alias for quantile_disc . quantile_disc(x, pos) The discrete pos -quantile of x for 0 <= pos <= 1 . Returns the greatest(ceil(pos * n_nonnull_values) - 1, 0) th (zero-indexed, in the specified order) value of x . Intuitively, assigns to each v ... or quantile_disc . | quantile_disc(x, pos) | Description | The discrete pos -quantile of x for 0 <= pos <= 1 . Returns the greatest(ceil(pos * n_nonnull_values) - 1, 0) th (zero-indexed, in the specified order) value of x . Intuitively, assigns to each v ...
https://man.mtool.work/duckdb/2.0/sql/functions/aggregates.html
PREV 1 NEXT
DuckDB 2.0 Documentation / man.mtool.work