⌘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 functions (0.003 sec.)
Nested Functions 11610
The following nested data types have dedicated function pages ( TUPLE values are handled by the STRUCT functions): Name Type page Functions page ARRAY ARRAY type ARRAY functions LIST LIST type LIST functions MAP MAP type MAP functions STRUC ... T STRUCT type STRUCT functions UNION UNION type UNION functions VARIANT VARIANT type VARIANT functions ...
https://man.mtool.work/duckdb/2.0/sql/functions/nested.html
Window Functions 10318
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 ... perators in SQL. Window functions are available in SQL since SQL:2003 and are supported by major SQL database systems. Examples Generate a row_number column ... amount of sales per region for each row: SELECT amount / sum(amount) OVER (PARTITION BY region) FROM sales; Syntax Window functions can be used in the SELECT , ORDER BY , and QUALIFY clauses. To share OVER specifications between functions, use the statem ... ent's WINDOW clause and use the OVER ⟨window_name⟩ syntax. General-Purpose Window Functions The table below shows the available general window functions. Name Description cume_dist([ORDER BY ordering]) The cumulati ...
https://man.mtool.work/duckdb/2.0/sql/functions/window_functions.html
QUALIFY Clause 9660
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 ... using a WITH clause instead of QUALIFY is included below the QUALIFY examples. Note that this is filtering based on WINDOW functions , not necessarily based on the WINDOW clause . The WINDOW clause is optional and can be used to simplify the creation of m ... t clause is for reference row_number() OVER (PARTITION BY schema_name ORDER BY function_name) AS function_rank FROM duckdb_functions() QUALIFY row_number() OVER (PARTITION BY schema_name ORDER BY function_name) < 3; Filter based on a window function defin ... hema_name, function_name, row_number() OVER (PARTITION BY schema_name ORDER BY function_name) AS function_rank FROM duckdb_functions() QUALIFY function_rank < 3; Filter based on a window function defined in the QUALIFY clause, but using the WINDOW clause: ...
https://man.mtool.work/duckdb/2.0/sql/query_syntax/qualify.html
JSON Processing Functions 9229
JSON Extraction Functions There are two extraction functions, which have their respective operators. The operators can only be used if the string is stored as the JSON logical type. These functions support the same two location notations as ... JSON Scalar functions . Function Alias Operator Description json_exists(json, path) Returns true if the supplied path exists in the json , and f ... ULL . Note that the arrow operator -> , which is used for JSON extracts, has a low precedence as it is also used in lambda functions . Therefore, you need to surround the -> operator with parentheses when expressing operations such as equality comparisons ... ) SELECT extracted_list[1] AS family, extracted_list[2] AS species FROM extracted; Processing Extracted Arrays with Lambda Functions When a path with a wildcard such as [*] extracts a JSON array into a LIST , the result can be processed further with lambd ...
https://man.mtool.work/duckdb/2.0/data/json/json_functions.html
CALL Statement 8798
The CALL statement invokes the given table function and returns the results. Thanks to the FROM -first syntax and the fact that procedures in DuckDB are implemented as table functions, you can use FROM instead of CALL . Examples Invoke the ... duckdb_functions table function: CALL duckdb_functions(); Invoke the pragma_table_info table function: CALL pragma_table_info('pg_am'); Sel ... ect only the functions where the name starts with ST_ : SELECT function_name, parameters, parameter_types, return_type FROM duckdb_functions() WH ...
https://man.mtool.work/duckdb/2.0/sql/statements/call.html
Lambda Functions 8469
DuckDB lambda functions (a.k.a. 'lambdas' or 'lambda expressions') are expressions that define an inline anonymous function. Lambdas are passed as argument to certain list functions , which evaluate the passed lambda expression against its ... nly scalar macros are allowed, and only if they do not rely on a subquery. For example, the following are all valid lambda functions: lambda param : param > 1 lambda s : contains(concat(s, 'DB'), 'duck') lambda acc, x : acc + x Lambda functions enable the ... use of more complex and flexible expressions in queries. Scalar Functions That Accept Lambda Functions Function Description apply(list, lambda(x)) Alias for list_transform . array_apply(list, lamb ... lambda x : x + 1) | | Result | [2, 3, 4] | | Aliases | apply , array_apply , array_transform , list_apply | Nesting Lambda Functions All scalar functions can be arbitrarily nested. For example, nested lambda functions to get all squares of even list eleme ...
https://man.mtool.work/duckdb/2.0/sql/functions/lambda.html
SELECT Clause 8413
The SELECT clause specifies the list of columns that will be returned by the query. While it appears first in the clause, logically the expressions here are executed only at the end. The SELECT clause can contain arbitrary expressions that ... transform the output, as well as aggregates and window functions. Examples Select all columns from the table called tbl : SELECT * FROM tbl; Perform arithmetic on the columns in a table, ... st case, * expands to all expressions in the FROM clause. Columns can also be selected using regular expressions or lambda functions. See the star expression page for more details. DISTINCT Clause Select all unique cities from the addresses table: SELECT ... total number of rows in the addresses table grouped by city: SELECT city, count(*) FROM addresses GROUP BY city; Aggregate functions are special functions that combine multiple rows into a single value. When aggregate functions are present in the SELECT c ...
https://man.mtool.work/duckdb/2.0/sql/query_syntax/select.html
Array Type 8197
An ARRAY column stores fixed-sized arrays. All fields in the column must have the same length and the same underlying type. Arrays are typically used to store arrays of numbers, but can contain any uniform data type, including ARRAY , LIST ... ith the array_value function: SELECT array_value(1, 2, 3); You can always implicitly cast an array to a list (and use list functions, like list_extract , [i] ): SELECT array_value(1, 2, 3)[2]; You can cast from a list to an array (the dimensions have to m ... rrays Retrieving one or more values from an array can be accomplished using brackets and slicing notation, or through list functions like list_extract and array_extract . Using the example in Defining an Array Field . The following queries for extracting ... ng the slicing notation returns a LIST : SELECT id, arr[1:2] AS elements FROM array_table; id elements 10 [1, 2] 20 [4, 5] Functions All LIST functions work with the ARRAY type. Additionally, several ARRAY -native functions are also supported. See the ARR ...
https://man.mtool.work/duckdb/2.0/sql/data_types/array.html
Write User Defined Functions 7982
Overview The JDBC driver can register user-defined functions (UDFs) written in Java, including scalar functions and table functions. This page covers building and registering both, from the simple functional-interface overloads to the vecto ... rized interface, along with type mapping and the function registry. Scalar Functions Build a scalar function with the DuckDBFunctions.scalarFunction() builder — which returns an org.duckdb.DuckDBScalarFuncti ... me passed to withName() . The builder is single-use: it is finalized once register() (or close() ) is called. The simplest functions map directly to a Java functional interface. Pick the overload that matches the number of arguments and, for primitives, t ... , BIGINT , or DOUBLE and avoid boxing. import java.sql.Connection; import java.sql.DriverManager; import org.duckdb.DuckDBFunctions; try (Connection conn = DriverManager.getConnection("jdbc:duckdb:")) { DuckDBFunctions.scalarFunction() .withName("java_ad ...
https://man.mtool.work/duckdb/2.0/clients/java/functions.html
SQLSmith Extension 7596
The sqlsmith extension is used for testing. Installing and Loading INSTALL AND LOAD sqlsmith; Functions The sqlsmith extension registers the following functions: sqlsmith fuzzyduck reduce_sql_statement fuzz_all_functions ...
https://man.mtool.work/duckdb/2.0/core_extensions/sqlsmith.html
PREV 1 2 3 4 5 6 7 8 9 10 NEXT
DuckDB 2.0 Documentation / man.mtool.work