Results of 1 - 10 of about 15 for city (0.003 sec.)
- SQL Introduction – DuckDB 12992
- 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
...u can create a new table by specifying the table name, along with all column names and their types: CREATE TABLE weather ( city VARCHAR , temp_lo INTEGER , -- minimum temperature on a day temp_hi INTEGER , -- maximum temperature on a day prcp FLOAT ,...the parameters for the command. First, the table name, weather , is given. Then the column names and column types follow. city VARCHAR specifies that the table has a column called city that is of type VARCHAR . VARCHAR specifies a data type that can...remember the order of the columns. An alternative syntax allows you to list the columns explicitly: INSERT INTO weather ( city , temp_lo , temp_hi , prcp , date ) VALUES ( 'San Francisco' , 43 , 57 , 0.0 , '1994-11-29' ); You can list the columns in... - https://man.mtool.work/duckdb/1.3/sql/introduction.html
- GROUPING SETS – DuckDB 10292
- 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
...provided four different dimensions: -- the syntax () denotes the empty set (i.e., computing an ungrouped aggregate) SELECT city , street_name , avg ( income ) FROM addresses GROUP BY GROUPING SETS (( city , street_name ), ( city ), ( street_name ), (...)); Compute the average income along the same dimensions: SELECT city , street_name , avg ( income ) FROM addresses GROUP BY CUBE ( city , street_name ); Compute the average income along the d...imensions (city, street_name) , (city) and () : SELECT city , street_name , avg ( income ) FROM addresses GROUP BY ROLLUP ( city , street_... - https://man.mtool.work/duckdb/1.3/sql/query_syntax/grouping_sets.html
- ORDER BY Clause – DuckDB 10066
- 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
...l examples use this example table: CREATE OR REPLACE TABLE addresses AS SELECT '123 Quack Blvd' AS address , 'DuckTown' AS city , '11111' AS zip UNION ALL SELECT '111 Duck Duck Goose Ln' , 'DuckTown' , '11111' UNION ALL SELECT '111 Duck Duck Goose Ln...Town' , '11111' UNION ALL SELECT '111 Duck Duck Goose Ln' , 'Duck Town' , '11111-0001' ; Select the addresses, ordered by city name using the default NULL order and default order: SELECT * FROM addresses ORDER BY city ; Select the addresses, ordered...by city name in descending order with nulls at the end: SELECT * FROM addresses ORDER BY city DESC NULLS LAST ; Order by city and... - https://man.mtool.work/duckdb/1.3/sql/query_syntax/orderby.html
- GROUP BY Clause – DuckDB 9979
- 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
...SETS page for more information. Examples Count the number of entries in the addresses table that belong to each different city: SELECT city , count ( * ) FROM addresses GROUP BY city ; Compute the average income 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_n...ame FROM addresses GROUP BY ALL ; Compute the average income per city per street_name. Since income is wrapped in an aggregate function, do not include it in the GROUP BY : SELECT city , stree... - https://man.mtool.work/duckdb/1.3/sql/query_syntax/groupby.html
- SELECT Clause – DuckDB 9840
- 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
...: 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: SELECT count ( * ) FROM addresses ; Select all co...lumns except the city column from the addresses table: SELECT * EXCLUDE ( city ) FROM addresses ; Select all columns from the addresses table, b...ut replace city with lower(city) : SELECT * REPLACE ( lower ( city ) AS city ) FROM addresses ; Select all columns matching the given regu... - https://man.mtool.work/duckdb/1.3/sql/query_syntax/select.html
- FROM and JOIN Clauses – DuckDB 9422
- 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
...ote that both tables are intentionally incomplete, i.e., they do not have a matching pair in the other table. CREATE TABLE city_airport ( city_name VARCHAR , iata VARCHAR ); CREATE TABLE airport_names ( iata VARCHAR , airport_name VARCHAR ); INSERT I...NTO city_airport VALUES ( 'Amsterdam' , 'AMS' ), ( 'Rotterdam' , 'RTM' ), ( 'Eindhoven' , 'EIN' ), ( 'Groningen' , 'GRQ' ); INSERT...irport' ), ( 'MST' , 'Maastricht Aachen Airport' ); To join the tables on their shared IATA attributes, run: SELECT * FROM city_airport NATURAL JOIN airport_names ; This produces the following result: city_name iata airport_name Amsterdam AMS Amsterd... - https://man.mtool.work/duckdb/1.3/sql/query_syntax/from.html
- PIVOT Statement – DuckDB 9213
- 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
...'US' , 'Seattle' , 2000 , 564 ), ( 'US' , 'Seattle' , 2010 , 608 ), ( 'US' , 'Seattle' , 2020 , 738 ), ( 'US' , 'New York City' , 2000 , 8015 ), ( 'US' , 'New York City' , 2010 , 8175 ), ( 'US' , 'New York City' , 2020 , 8772 ); SELECT * FROM cities...1005 NL Amsterdam 2010 1065 NL Amsterdam 2020 1158 US Seattle 2000 564 US Seattle 2010 608 US Seattle 2020 738 US New York City 2000 8015 US New York City 2010 8175 US New York City 2020 8772 PIVOT ON and USING Use the PIVOT statement below to create...year USING sum ( population ); country name 2000 2010 2020 NL Amsterdam 1005 1065 1158 US Seattle 564 608 738 US New York City 8015 8175 8772 In the above example, the sum aggregate is always operating on a single value. If we only want to change th... - https://man.mtool.work/duckdb/1.3/sql/statements/pivot.html
- HAVING Clause – DuckDB 8655
- 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
...lause occurs after the 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 average income per city per street_name , filtering out cities with an average income bigger than twice the median income : SELECT city , street_n...ame , avg ( income ) FROM addresses GROUP BY city , street_name HAVING avg ( income ) > 2 * median ( income ); Syntax 関連キーワード clause city income after grouping addre... - https://man.mtool.work/duckdb/1.3/sql/query_syntax/having.html
- UPDATE Statement – DuckDB 8342
- 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
...ows to update, UPDATE statements can use the FROM clause and express joins via the WHERE clause. For example: CREATE TABLE city ( name VARCHAR , revenue BIGINT , country_code VARCHAR ); CREATE TABLE country ( code VARCHAR , name VARCHAR ); INSERT INT...O city VALUES ( 'Paris' , 700 , 'FR' ), ( 'Lyon' , 200 , 'FR' ), ( 'Brussels' , 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 country WHERE city.country_... - https://man.mtool.work/duckdb/1.3/sql/statements/update.html
- LIMIT and OFFSET Clauses – DuckDB 7314
- 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
...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 LIMIT 5 ; Select 10% of the rows from th...M addresses LIMIT 10 % ; Syntax 関連キーワード addresses rows clause first table population Syntax position values without city Documentation Query Copy Markdown Clauses output modifier Logically applied query restricts amount fetched indicates 関連す... - https://man.mtool.work/duckdb/1.3/sql/query_syntax/limit.html
DuckDB 1.3 Documentation / man.mtool.work