⌘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 27 for duplicate (0.003 sec.)
Set Operations 13792
Set operations allow queries to be combined according to set operation semantics . Set operations refer to the UNION [ALL] , INTERSECT [ALL] and EXCEPT [ALL] clauses. The vanilla variants use set semantics, i.e., they eliminate duplicates, ... lause throws an error. Vanilla UNION (Set Semantics) The vanilla UNION clause follows set semantics, therefore it performs duplicate elimination, i.e., only unique rows will be included in the result. SELECT * FROM range(2) t1(x) UNION SELECT * FROM range ... t2(x); x 2 1 0 UNION ALL (Bag Semantics) UNION ALL returns all rows of both queries following bag semantics, i.e., without duplicate elimination. SELECT * FROM range(2) t1(x) UNION ALL SELECT * FROM range(3) t2(x); x 0 1 0 1 2 UNION [ALL] BY NAME The UNIO ... NULL NULL Berlin Germany NULL NULL Amsterdam NULL 10 2022-10-14 UNION BY NAME follows set semantics (therefore it performs duplicate elimination), whereas UNION ALL BY NAME follows bag semantics. INTERSECT The INTERSECT clause can be used to select all ro ...
https://man.mtool.work/duckdb/2.0/sql/query_syntax/setops.html
CREATE INDEX Statement 11866
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 ... ate index s_idx that allows for duplicate values on column revenue of table films : CREATE INDEX s_idx ON films (revenue); Create index if it does not yet exist: CR ... e integers : CREATE INDEX i_index ON integers ((j + k)); Parameters Name Description UNIQUE Causes the system to check for duplicate values in the table when the index is created (if data already exist) and each time data is added. Attempts to insert or u ... pdate data that would result in duplicate entries will generate an error. name The name of the index to be created. table The name of the table to be indexed. colum ...
https://man.mtool.work/duckdb/2.0/sql/statements/create_index.html
Constraints 11685
In SQL, constraints can be specified for tables. Constraints enforce certain properties over data that is inserted into a table. Constraints can be specified along with the schema of the table as part of the CREATE TABLE statement . In cert ... me VARCHAR); INSERT INTO students VALUES (1, 'Student 1'); INSERT INTO students VALUES (1, 'Student 2'); Constraint Error: Duplicate key "id: 1" violates primary key constraint CREATE TABLE students (id INTEGER, name VARCHAR, PRIMARY KEY (id, name)); INSE ... Student 1'); INSERT INTO students VALUES (1, 'Student 2'); INSERT INTO students VALUES (1, 'Student 1'); Constraint Error: Duplicate key "id: 1, name: Student 1" violates primary key constraint To enforce this property efficiently, an ART index is automat ... (1, 'Student 1', 'student1@uni.com'); INSERT INTO students VALUES (2, 'Student 2', 'student1@uni.com'); Constraint Error: Duplicate key "email: student1@uni.com" violates unique constraint. INSERT INTO students (id, name) VALUES (3, 'Student 3'); INSERT ...
https://man.mtool.work/duckdb/2.0/sql/constraints.html
Connect 9940
Overview Every DuckDB feature reachable from Java starts with a Connection . This page covers the JDBC URL forms the driver accepts, how DuckDB and driver options are passed and which of them win, how connections come to share (or not share ... anager.getConnection("jdbc:duckdb:"); Additional connections can be created using the DriverManager . The DuckDBConnection#duplicate() method opens another connection to the same database instance without re-reading the configuration: DuckDBConnection con ... n2 = ((DuckDBConnection) conn).duplicate(); Its main purpose is to reach a connection-private in-memory database instance — the one created by the plain jdbc:duckd ... b: URL — which no other URL can address. On a named in-memory or a file-backed connection, duplicate() is effectively the same as opening a new connection on the same URL, because those instances are shared through the inst ...
https://man.mtool.work/duckdb/2.0/clients/java/connecting.html
SQL Introduction 8722
This page provides an overview of how to perform simple operations in SQL. This tutorial is only intended to give you an introduction and is in no way a complete tutorial on SQL. This tutorial is adapted from the PostgreSQL tutorial . DuckD ... But you'd always get the results shown above if you do: SELECT * FROM weather ORDER BY city, temp_lo; You can request that duplicate rows be removed from the result of a query: SELECT DISTINCT city FROM weather; city San Francisco Hayward Here again, the ... 94.000 Since the columns all had different names, the parser automatically found which table they belong to. If there were duplicate column names in the two tables you'd need to qualify the column names to show which one you meant, as in: SELECT weather.c ... er.city; It is widely considered good style to qualify all column names in a join query, so that the query won't fail if a duplicate column name is later added to one of the tables. Join queries of the kind seen thus far can also be written in this altern ...
https://man.mtool.work/duckdb/2.0/sql/introduction.html
JSON Type 8377
DuckDB supports json via the JSON logical type. For example: SELECT '[1, null, {"key": "value"}]'::JSON; [1, null, {"key": "value"}] Logically, the JSON type is similar to a VARCHAR , but with the restriction that it must be valid JSON. Phy ... VARCHAR { "a":5 } The order of keys in objects is significant: SELECT '{"a":1,"b":2}'::JSON = '{"b":2,"a":1}'::JSON; false Duplicate keys are allowed in JSON objects: SELECT '{"a":1,"a":2}'::JSON; {"a":1,"a":2} We allow any of DuckDB's types to be cast to ...
https://man.mtool.work/duckdb/2.0/data/json/json_type.html
GROUP BY Clause 8196
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 ... , 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; Compute the average income per city per street_name. Since i ...
https://man.mtool.work/duckdb/2.0/sql/query_syntax/groupby.html
Python Client API 8015
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 ... n out of the passing in Python function so it can be used in queries cursor ( self ) → _duckdb.DuckDBPyConnection Create a duplicate of the current connection decimal_type ( self , width : int , scale : int ) → _duckdb._sqltypes.DuckDBPyType Create a deci ... ies dtype ( self , type_str : str ) → _duckdb._sqltypes.DuckDBPyType Create a type object by parsing the ‘type_str' string duplicate ( self ) → _duckdb.DuckDBPyConnection Create a duplicate of the current connection enable_profiling ( self ) → None Enable ... : DuckDBPyRelation , * , all : bool = True ) → DuckDBPyRelation Rows from both relations, matching columns by name; keeps duplicates unless all is false. Detailed examples can be found at Relational API page . unique ( unique_aggr : str ) → DuckDBPyRelat ...
https://man.mtool.work/duckdb/2.0/clients/python/reference/
Overview of DuckDB Internals 8015
Tip For a detailed explanation of DuckDB internals, see the Design and Implementation of DuckDB Internals ("DiDi") library entry. On this page is a brief description of the internals of the DuckDB engine. Parser The parser converts a query ... Rewriter : Simplifies expressions, performs constant folding Filter Pushdown : Pushes filters down into the query plan and duplicates filters over equivalency sets. Also prunes subtrees that are guaranteed to be empty (because of filters that statically e ... k is used. Common Sub Expressions : Extracts common subexpressions from projection and filter nodes to prevent unnecessary duplicate execution. In Clause Rewriter : Rewrites large static IN clauses to a MARK join or INNER join. Column Binding Resolver The ...
https://man.mtool.work/duckdb/2.0/internals/overview.html
Timestamp Issues 7850
Timestamp with Time Zone Promotion Casts Working with time zones in SQL can be quite confusing at times. For example, when filtering to a date range, one might try the following query: SET timezone = 'America/Los_Angeles'; CREATE TABLE time ... parts one by one because the underlying binning computation computes all parts, so picking out the ones in the list avoids duplicate time zone conversions. Also notice that we are leveraging the DATE cast rules from the previous section to bound the calen ...
https://man.mtool.work/duckdb/2.0/guides/sql_features/timestamps.html
PREV 1 2 3 NEXT
DuckDB 2.0 Documentation / man.mtool.work