⌘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 31 for elements (0.006 sec.)
List Functions 13265
Function Description list[index] Extracts a single list element using a (1-based) index . list[begin[:end][:step]] Extracts a sublist using slice conventions . Negative values are accepted. list1 && list2 Alias for list_has_any . list1 <-> ... st_slice . array_sort(list[, col1][, col2]) Alias for list_sort . array_to_string(list, delimiter) Concatenates list/array elements using an optional delimiter . array_to_string_comma_default(array) Concatenates list/array elements with a comma delimiter ... ) Alias for list_aggregate . list_aggregate(list, function_name, ...) Executes the aggregate function function_name on the elements of list . See the List Aggregates section for more details. list_any_value(list) Applies aggregate function any_value to t ... list, index) Extract the index th (1-based) value from the list. list_filter(list, lambda(x)) Constructs a list from those elements of the input list for which the lambda function returns true . DuckDB must be able to cast the lambda function's return ty ...
https://man.mtool.work/duckdb/2.0/sql/functions/list.html
Array Functions 12569
All LIST functions work with the ARRAY data type . Additionally, several ARRAY -native functions are also supported. Array-Native Functions Function Description array_cosine_distance(array1, array2) Computes the cosine distance between two ... arrays of the same size. The array elements cannot be NULL . The arrays can have any size as long as the size is the same for both arguments. array_cosine_similarity( ... array1, array2) Computes the cosine similarity between two arrays of the same size. The array elements cannot be NULL . The arrays can have any size as long as the size is the same for both arguments. array_cross_product(arra ... y, array) Computes the cross product of two arrays of size 3. The array elements cannot be NULL . array_distance(array1, array2) Computes the distance between two arrays of the same size. The array eleme ...
https://man.mtool.work/duckdb/2.0/sql/functions/array.html
Lambda Functions 10984
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 ... _filter . list_apply(list, lambda(x)) Alias for list_transform . list_filter(list, lambda(x)) Constructs a list from those elements of the input list for which the lambda function returns true . DuckDB must be able to cast the lambda function's return ty ... er is the same as the input list's. See list_filter examples . list_reduce(list, lambda(x,y)[, initial_value]) Reduces all elements of the input list into a single scalar value by executing the lambda function on a running result and the next list elemen ... a(x,y)[, initial_value]) Alias for list_reduce . list_filter(list, lambda(x)) | Description | Constructs a list from those elements of the input list for which the lambda function returns true . DuckDB must be able to cast the lambda function's return ty ...
https://man.mtool.work/duckdb/2.0/sql/functions/lambda.html
Python Client API 10628
Connection class duckdb. Appender Bases: object append_row ( self , * args ) → None Buffer one row, one value per column, each converted as an executemany parameter would be append_rows ( self , rows : object ) → None Buffer each row of an ... tr , groups : str = '' , window_spec : str = '' , projected_columns : str = '' ) → DuckDBPyRelation Computes the number of elements present in a given expression. Detailed examples can be found at Relational API page . create ( table_name : str ) → None ... d at Relational API page . value_counts ( expression : str , groups : str = '' ) → DuckDBPyRelation Computes the number of elements present in a given expression, also projecting the original expression. Detailed examples can be found at Relational API p ... the form of the earlier expression API. One argument is one member, so a list given as one argument is compared whole; its elements are several arguments, and asking whether a list-typed column holds a value is fn(“list_contains”, …) . isnotin ( * values ...
https://man.mtool.work/duckdb/2.0/clients/python/reference/
Aggregate Functions 8978
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 ... computation of the aggregate. This is typically used in combination with the count aggregate to get the number of distinct elements; but it can be used together with any aggregate function in the system. There are some aggregates that are insensitive to ... unts. histogram(arg, boundaries) Returns a MAP of key-value pairs representing the provided upper boundaries and counts of elements in the corresponding bins (left-open and right-closed partitions) of the datatype. A boundary at the largest value of the ... datatype is automatically added when elements larger than all provided boundaries appear, see is_histogram_other_bin . Boundaries may be provided, e.g., via equi_width_ ...
https://man.mtool.work/duckdb/2.0/sql/functions/aggregates.html
Samples 8768
Samples are used to randomly select a subset of a dataset. Examples Select a sample of exactly 5 rows from tbl using reservoir sampling: SELECT * FROM tbl USING SAMPLE 5; Select a sample of approximately 10% of the table using system sampli ... ed. The sampling methods are described in detail below. Samples require a sample size , which is an indication of how many elements will be sampled from the total population. Samples can either be given as a percentage ( 10% or 10 PERCENT ) or as a fixed ... ing technique that selects a random sample by keeping a reservoir of size equal to the sample size, and randomly replacing elements as more elements come in. Reservoir sampling allows us to specify exactly how many elements we want in the resulting sampl ... e (by selecting the size of the reservoir). As a result, reservoir sampling always outputs the same amount of elements, unlike system and bernoulli sampling. Reservoir sampling is only recommended for small sample sizes, and is not recommend ...
https://man.mtool.work/duckdb/2.0/sql/samples.html
Run Queries 8622
Overview Java applications send queries and read result sets through the familiar Statement , PreparedStatement , and ResultSet interfaces. This page covers sending queries and reading DuckDB's nested and composite types. For opening the Co ... onObject(int) . DuckDBStruct.getMap() returns the struct fields keyed by name. DuckDBArray.getResultSet() exposes the list elements as an org.duckdb.DuckDBArrayResultSet , a read-only ResultSet with two columns: INDEX , the 1-based position of the elemen ... mt.executeQuery("SELECT [10, 20, 30] AS l")) { rs.next(); DuckDBArray list = (DuckDBArray) rs.getObject(1); try (ResultSet elements = list.getResultSet()) { while (elements.next()) { int index = elements.getInt("INDEX"); // 1-based position int value = e ... lements.getInt("VALUE"); // the element System.out.println(index + " -> " + value); } } } A JSON column is returned by getObject(int) (and getJsonObject(int) ) as ...
https://man.mtool.work/duckdb/2.0/clients/java/querying.html
marimo Notebooks 8218
marimo is an open-source reactive notebook for Python and SQL that's tightly integrated with DuckDB's Python client, letting you mix and match Python and SQL in a single git-versionable notebook. Unlike traditional notebooks, when you run a ... hon values into the query with {} (shown later). In particular, this means your SQL queries can depend on the values of UI elements or other Python values, all part of marimo's dataflow graph. Warning Heads up! If you have user-generated content going in ... LECT i AS id, random() AS random_value, FROM range({digits.value}) AS t(i); SELECT * FROM random_data; Interacting with UI elements, like a slider, makes your data more tangible. DuckDB-Powered OLAP Analytics in marimo marimo provides several features th ... on between Python and SQL Reactive execution that automatically updates dependent cells when queries change Interactive UI elements that can be used to parameterize SQL queries Ability to export notebooks as standalone applications or Python scripts, or ...
https://man.mtool.work/duckdb/2.0/guides/python/marimo.html
Types 8137
DuckDB is a strongly typed database system. As such, every column has a single type specified. This type is constant over the entire column. That is to say, a column that is labeled as an INTEGER column will only contain INTEGER values. Duc ... ate : The date object, as obtained from a DUCKDB_TYPE_DATE column. Return Value The duckdb_date_struct with the decomposed elements. duckdb_to_date Re-compose a duckdb_date from year, month and date ( duckdb_date_struct ). Syntax duckdb_date duckdb_to_da ... ime : The time object, as obtained from a DUCKDB_TYPE_TIME column. Return Value The duckdb_time_struct with the decomposed elements. duckdb_create_time_tz Create a duckdb_time_tz object from micros and a timezone offset. Syntax duckdb_time_tz duckdb_crea ... e ts object, as obtained from a DUCKDB_TYPE_TIMESTAMP column. Return Value The duckdb_timestamp_struct with the decomposed elements. duckdb_to_timestamp Re-compose a duckdb_timestamp from a duckdb_timestamp_struct. Syntax duckdb_timestamp duckdb_to_times ...
https://man.mtool.work/duckdb/2.0/clients/c/types.html
Unnesting 8072
Unnesting is an operation that decomposes values of a composite types into its components. Values of the LIST and STRUCT type may be unnested using the unnest() function . Unnesting turns a LIST -typed value into a table column: each list-e ... element unnnested from the LIST -typed value. Consequently, if unnest() gets called on an empty list (or a NULL value), no elements are unnested, and no 'output' rows are generated. Unnesting Multiple Lists Multiple LIST -typed values may be unnested wit ... eir values by ordinal position, and backfilling columns with NULL -values when a particular result has a smaller number of elements than any of the other results. In a final step, the columns of the input row are added to this result. In other words, the ... unnesting always respects the type of the outermost call to unnest() : If a LIST -typed value is passed, then LIST -typed elements will be recursively unnested, while STRUCT -typed elements are not further unpacked. If a STRUCT -typed value is passed, t ...
https://man.mtool.work/duckdb/2.0/sql/query_syntax/unnest.html
PREV 1 2 3 4 NEXT
DuckDB 2.0 Documentation / man.mtool.work