⌘K ctrl+k
Search Shortcut cmd + k | ctrl + k
DuckDB 1.3 ドキュメント 全文検索
per page, with , order by , clip by
Results of 1 - 10 of about 11 for cities (0.004 sec.)
PIVOT Statement – DuckDB 12482
This page is for DuckDB 1.3, which is outdated. Switch to the current version . Search Shortcut cmd + k | ctrl + k Installation Documentation Getting Started Connect Overview Concurrency Data Import Overview Data Sources CSV Files Overview ... al, but they may not all be omitted. Example Data All examples use the dataset produced by the queries below: CREATE TABLE cities ( country VARCHAR , name VARCHAR , year INTEGER , population INTEGER ); INSERT INTO cities VALUES ( 'NL' , 'Amsterdam' , 2 ... k City' , 2000 , 8015 ), ( 'US' , 'New York City' , 2010 , 8175 ), ( 'US' , 'New York City' , 2020 , 8772 ); SELECT * FROM cities ; country name year population NL Amsterdam 2000 1005 NL Amsterdam 2010 1065 NL Amsterdam 2020 1158 US Seattle 2000 564 US ... to the values parameter in a spreadsheet pivot table. If the USING clause is not included, it defaults to count(*) . PIVOT cities ON year USING sum ( population ); country name 2000 2010 2020 NL Amsterdam 1005 1065 1158 US Seattle 564 608 738 US New Yo ...
https://man.mtool.work/duckdb/1.3/sql/statements/pivot.html
SQL Introduction – DuckDB 12127
This page is for DuckDB 1.3, which is outdated. Switch to the current version . Search Shortcut cmd + k | ctrl + k Installation Documentation Getting Started Connect Overview Concurrency Data Import Overview Data Sources CSV Files Overview ... R , SMALLINT , FLOAT , DOUBLE , DECIMAL , CHAR(n) , VARCHAR(n) , DATE , TIME and TIMESTAMP . The second example will store cities and their associated geographical location: CREATE TABLE cities ( name VARCHAR , lat DECIMAL , lon DECIMAL ); Finally, it ... quotes ( '' ), as in the example. Input dates for the date type must be formatted as 'YYYY-MM-DD' . We can insert into the cities table in the same manner. INSERT INTO cities VALUES ( 'San Francisco' , -194.0 , 53.0 ); The syntax used so far requires y ... y. To do that, we need to compare the city column of each row of the weather table with the name column of all rows in the cities table, and select the pairs of rows where these values match. This would be accomplished by the following query: SELECT * ...
https://man.mtool.work/duckdb/1.3/sql/introduction.html
Writing JSON – DuckDB 9584
This page is for DuckDB 1.3, which is outdated. Switch to the current version . Search Shortcut cmd + k | ctrl + k Installation Documentation Getting Started Connect Overview Concurrency Data Import Overview Data Sources CSV Files Overview ... tables or the result of queries can be written directly to a JSON file using the COPY statement. For example: CREATE TABLE cities AS FROM ( VALUES ( 'Amsterdam' , 1 ), ( 'London' , 2 )) cities ( name , id ); COPY cities TO 'cities.json' ; This will res ... ult in cities.json with the following content: { "name" : "Amsterdam" , "id" : 1 } { "name" : "London" , "id" : 2 } See the COPY stateme ... nt for more information. 関連キーワード cities statement Amsterdam London json Documentation Import Files Copy Markdown Writing contents tables queries written directly ...
https://man.mtool.work/duckdb/1.3/data/json/writing_json.html
VALUES Clause – DuckDB 9068
This page is for DuckDB 1.3, which is outdated. Switch to the current version . Search Shortcut cmd + k | ctrl + k Installation Documentation Getting Started Connect Overview Concurrency Data Import Overview Data Sources CSV Files Overview ... e two rows as part of a FROM clause, and rename the columns: SELECT * FROM ( VALUES ( 'Amsterdam' , 1 ), ( 'London' , 2 )) cities ( name , id ); Generate two rows and insert them into a table: INSERT INTO cities VALUES ( 'Amsterdam' , 1 ), ( 'London' , ... 2 ); Create a table directly from a VALUES clause: CREATE TABLE cities AS SELECT * FROM ( VALUES ( 'Amsterdam' , 1 ), ( 'London' , 2 )) cities ( name , id ); Syntax 関連キーワード clause rows A ... msterdam London cities Generate Syntax used statement part directly them table Documentation Query Copy Markdown Clause specify fixed number stan ...
https://man.mtool.work/duckdb/1.3/sql/query_syntax/values.html
Pivot Internals – DuckDB 8713
This page is for DuckDB 1.3, which is outdated. Switch to the current version . Search Shortcut cmd + k | ctrl + k Installation Documentation Getting Started Connect Overview Concurrency Data Import Overview Data Sources CSV Files Overview ... s have been populated with ENUM s, the query is re-written again into a set of aggregations into lists. For example: PIVOT cities ON year USING sum ( population ); is initially translated into: CREATE TEMPORARY TYPE __pivot_enum_0_0 AS ENUM ( SELECT DI ... STINCT year :: VARCHAR FROM cities ORDER BY year ); PIVOT cities ON year IN __pivot_enum_0_0 USING sum ( population ); and finally translated into: SELECT co ... e , list ( year ), list ( population_sum ) FROM ( SELECT country , name , year , sum ( population ) AS population_sum FROM cities GROUP BY ALL ) GROUP BY ALL ; This produces the result: country name list("year") list(population_sum) NL Amsterdam [2000, ...
https://man.mtool.work/duckdb/1.3/internals/pivot.html
HAVING Clause – DuckDB 8250
This page is for DuckDB 1.3, which is outdated. Switch to the current version . Search Shortcut cmd + k | ctrl + k Installation Documentation Getting Started Connect Overview Concurrency Data Import Overview Data Sources CSV Files Overview ... e grouping. Examples Count the number of entries in the addresses table that belong to each different city , filtering out cities with a count below 50: SELECT city , count ( * ) FROM addresses GROUP BY city HAVING count ( * ) >= 50 ; Compute the avera ... ge income per city per street_name , filtering out cities with an average income bigger than twice the median income : SELECT city , street_name , avg ( income ) FROM addresses GRO ... median ( income ); Syntax 関連キーワード clause city income after grouping addresses count street Syntax occurs filtering cities average median Documentation Query Copy Markdown Clause used provide filter criteria completed terms 関連するページ GROUP ...
https://man.mtool.work/duckdb/1.3/sql/query_syntax/having.html
SELECT Clause – DuckDB 8250
This page is for DuckDB 1.3, which is outdated. Switch to the current version . Search Shortcut cmd + k | ctrl + k Installation Documentation Getting Started Connect Overview Concurrency Data Import Overview Data Sources CSV Files Overview ... FROM table_name ; Use prefix aliases: SELECT res : col1 + col2 , root : sqrt ( col1 ) FROM table_name ; Select all unique cities from the addresses table: SELECT DISTINCT city FROM addresses ; Return the total number of rows in the addresses table: SE ... regular expressions or lambda functions. See the star expression page for more details. DISTINCT Clause Select all unique cities from the addresses table: SELECT DISTINCT city FROM addresses ; The DISTINCT clause can be used to return only the unique ... ON Clause Select only the highest population city for each country: SELECT DISTINCT ON ( country ) city , population FROM cities ORDER BY population DESC ; The DISTINCT ON clause returns only one row per unique value in the set of expressions as defin ...
https://man.mtool.work/duckdb/1.3/sql/query_syntax/select.html
LIMIT and OFFSET Clauses – DuckDB 7397
This page is for DuckDB 1.3, which is outdated. Switch to the current version . Search Shortcut cmd + k | ctrl + k Installation Documentation Getting Started Connect Overview Concurrency Data Import Overview Data Sources CSV Files Overview ... ble, starting at position 5 (i.e., ignoring the first 5 rows): SELECT * FROM addresses LIMIT 5 OFFSET 5 ; Select the top 5 cities with the highest population: SELECT city , count ( * ) AS population FROM addresses GROUP BY city ORDER BY population DESC ...
https://man.mtool.work/duckdb/1.3/sql/query_syntax/limit.html
UPDATE Statement – DuckDB 7326
This page is for DuckDB 1.3, which is outdated. Switch to the current version . Search Shortcut cmd + k | ctrl + k Installation Documentation Getting Started Connect Overview Concurrency Data Import Overview Data Sources CSV Files Overview ... sels' , 400 , 'BE' ); INSERT INTO country VALUES ( 'FR' , 'France' ), ( 'BE' , 'Belgium' ); To increase the revenue of all cities in France, join the city and the country tables, and filter on the latter: UPDATE city SET revenue = revenue + 100 FROM co ...
https://man.mtool.work/duckdb/1.3/sql/statements/update.html
SELECT Statement – DuckDB 7272
This page is for DuckDB 1.3, which is outdated. Switch to the current version . Search Shortcut cmd + k | ctrl + k Installation Documentation Getting Started Connect Overview Concurrency Data Import Overview Data Sources CSV Files Overview ... Use column indexes to select the first and third column from the table tbl : SELECT # 1 , # 3 FROM tbl ; Select all unique cities from the addresses table: SELECT DISTINCT city FROM addresses ; Return a STRUCT by using a row variable: SELECT d FROM ( S ...
https://man.mtool.work/duckdb/1.3/sql/statements/select.html
PREV 1 2 NEXT
DuckDB 1.3 Documentation / man.mtool.work