⌘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 125 for Examples (0.005 sec.)
Python Client API 17421
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 ... : object A query built a step at a time; it runs only when a method reads its rows, and runs again on every read. Detailed examples can be found at Relational API page . aggregate ( aggr_expr : object , group_expr : object = '' ) → DuckDBPyRelation Compu ... te the aggregate aggr_expr by the optional groups group_expr on the relation. Detailed examples can be found at Relational API page . alias Get the name of the current alias. Detailed examples can be found at Relationa ... '' , projected_columns : str = '' ) → DuckDBPyRelation Returns the first non-null value from a given expression. Detailed examples can be found at Relational API page . apply ( function_name : str , function_aggr : str , group_expr : str = '' , function ...
https://man.mtool.work/duckdb/2.0/clients/python/reference/
Lambda Functions 9595
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 ... he lambda function's return type to BOOL . The return type of list_filter 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 exe ... on a running result and the next list element. The lambda function has an optional initial_value argument. See list_reduce examples . list_transform(list, lambda(x)) Returns a list that is the result of applying the lambda function to each element of the ... input list . The return type is defined by the return type of the lambda function. See list_transform examples . reduce(list, lambda(x,y)[, initial_value]) Alias for list_reduce . list_filter(list, lambda(x)) | Description | Construc ...
https://man.mtool.work/duckdb/2.0/sql/functions/lambda.html
Hugging Face Support 9423
The httpfs extension introduces support for the hf:// protocol to access datasets hosted in Hugging Face repositories. See the announcement blog post for details. Usage Hugging Face repositories can be queried using the following URL patter ... et⟩/⟨path_to_file⟩ For example, to read a CSV file, you can use the following query: SELECT * FROM 'hf://datasets/datasets-examples/doc-formats-csv-1/data.csv'; Where: datasets-examples is the name of the user/organization doc-formats-csv-1 is the name o ... sound dog woof cat meow pokemon pika human hello To read a JSONL file, you can run: SELECT * FROM 'hf://datasets/datasets-examples/doc-formats-jsonl-1/data.jsonl'; Finally, for reading a Parquet file, use the following query: SELECT * FROM 'hf://dataset ... s/datasets-examples/doc-formats-parquet-1/data/train-00000-of-00001.parquet'; Each of these commands reads the data from the specified file fo ...
https://man.mtool.work/duckdb/2.0/core_extensions/httpfs/hugging_face.html
GROUP BY Clause 8588
The GROUP BY clause specifies which grouping columns should be used to perform any aggregations in the SELECT clause. If the GROUP BY clause is specified, the query is always an aggregate query, even if no aggregations are present in the SE ... d prevents bugs by keeping the SELECT granularity aligned to the GROUP BY granularity (e.g., it prevents duplication). See examples below and additional examples in the “Friendlier SQL with DuckDB” blog post . Multiple Dimensions Normally, the GROUP BY c ... nt(*) AS n FROM (VALUES (['a', 'b']), (['b', 'c']), (['b'])) t(tags) GROUP BY unnest(tags) ORDER BY tag; tag n a 1 b 3 c 1 Examples Count the number of entries in the addresses table that belong to each different city: SELECT city, count(*) FROM addresse ... e per city per street_name : SELECT city, street_name, avg(income) FROM addresses GROUP BY city, street_name; GROUP BY ALL Examples Group by city and street_name to remove any duplicate values: SELECT city, street_name FROM addresses GROUP BY ALL; Comput ...
https://man.mtool.work/duckdb/2.0/sql/query_syntax/groupby.html
LOAD / INSTALL Statements 8170
INSTALL The INSTALL statement downloads an extension so it can be loaded into a DuckDB session. Examples Install the httpfs extension: INSTALL httpfs; Install the h3 community extension : INSTALL h3 FROM community; Syntax LOAD The LOAD stat ... and loads any extensions it depends on. For example, loading iceberg also installs the avro extension that it depends on. Examples Load the httpfs extension: LOAD httpfs; Load the spatial extension: LOAD spatial; Syntax INSTALL AND LOAD New The INSTALL ... ixed with FORCE and can be followed by a FROM clause to select the repository and a VERSION clause to select the version . Examples Install and load the spatial extension: INSTALL AND LOAD spatial; Install and load the h3 community extension : INSTALL AN ...
https://man.mtool.work/duckdb/2.0/sql/statements/load_and_install.html
ORDER BY Clause 7838
ORDER BY is an output modifier. Logically it is applied near the very end of the query (just prior to LIMIT or OFFSET , if present). The ORDER BY clause sorts the rows on the sorting criteria in either ascending or descending order. In addi ... T . Note that ALL may not be used in combination with other expressions in the ORDER BY clause – it must be by itself. See examples below. NULL Order Modifier By default, DuckDB sorts ASC and NULLS LAST , i.e., the values are sorted in ascending order an ... ther languages. For this purpose, DuckDB provides collations. For more information on collations, see the Collation page . Examples All examples use this example table: CREATE OR REPLACE TABLE addresses AS SELECT '123 Quack Blvd' AS address, 'DuckTown' A ... R BY city, zip; Order by city using German collation rules: SELECT * FROM addresses ORDER BY city COLLATE DE; ORDER BY ALL Examples Order from left to right (by address, then by city, then by zip) in ascending order: SELECT * FROM addresses ORDER BY ALL; ...
https://man.mtool.work/duckdb/2.0/sql/query_syntax/orderby.html
QUALIFY Clause 7592
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 ... ring (much like HAVING avoids a subquery). An example 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 ... se is following the WINDOW clause in a SELECT statement ( WINDOW does not need to be specified), and before the ORDER BY . Examples Each of the following examples produce the same output, located below. Filter based on a window function defined in the QU ...
https://man.mtool.work/duckdb/2.0/sql/query_syntax/qualify.html
Dot Commands 7506
Dot commands are available in the DuckDB CLI client. To use one of these commands, begin the line with a period ( . ) immediately followed by the name of the command you wish to execute. Additional arguments to the command are entered, spac ... Turn logging on or off . FILE can be stderr / stdout .manual ⟨FUNCTION⟩ Show the manual page (signatures, descriptions and examples) for a SQL function. See the manual section .maxbytes ⟨COUNT⟩ Sets the maximum number of bytes of rows for display ( 0 = a ... first argument. .help m .manual FUNCTION Show the manual page for a SQL function Displays the signatures, descriptions and examples of all overloads of FUNCTION. FUNCTION may be qualified: [database.][schema.]function. .maxbytes COUNT Sets the maximum nu ... 2.0. The .manual command displays a manual page for a SQL function, including its signatures (overloads), description and examples. This information is retrieved from the duckdb_functions() table function . .manual map ────────────────────────────────── ...
https://man.mtool.work/duckdb/2.0/clients/cli/dot_commands.html
CREATE INDEX Statement 6917
CREATE INDEX The CREATE INDEX statement constructs an index on the specified column(s) of the specified table. Examples Create a unique index films_id_idx on the column id of table films : CREATE UNIQUE INDEX films_id_idx ON films (id); Cre ... alue pair (e.g., my_option = 2 ). Optional. Syntax DROP INDEX DROP INDEX drops an existing index from the database system. Examples Remove the index title_idx : DROP INDEX title_idx; Parameters Name Description IF EXISTS Do not throw an error if the inde ...
https://man.mtool.work/duckdb/2.0/sql/statements/create_index.html
Date Format Functions 6843
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 ... sentations, these functions accept a format string that describes how the date or timestamp should be structured. strftime Examples The strftime(timestamp, format) converts timestamps or dates to strings according to the specified pattern. SELECT strftim ... LECT strftime(TIMESTAMP '1992-03-02 20:32:45', '%A, %-d %B %Y - %I:%M:%S %p'); Monday, 2 March 1992 - 08:32:45 PM strptime Examples The strptime(text, format) function converts strings to timestamps according to the specified pattern. SELECT strptime('02 ... . DATEFORMAT will be used for converting dates, and TIMESTAMPFORMAT will be used for converting timestamps. Below are some examples for how to use this. In a COPY statement: COPY dates FROM 'test.csv' (DATEFORMAT '%d/%m/%Y', TIMESTAMPFORMAT '%A, %-d %B % ...
https://man.mtool.work/duckdb/2.0/sql/functions/dateformat.html
PREV 1 2 3 4 5 6 7 8 9 10 NEXT
DuckDB 2.0 Documentation / man.mtool.work