Results of 1 - 6 of about 6 for sales (0.003 sec.)
- UNPIVOT Statement – DuckDB 13069
- 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
...number_of_rows ; Example Data All examples use the dataset produced by the queries below: CREATE OR REPLACE TABLE monthly_sales ( empid INTEGER , dept TEXT , Jan INTEGER , Feb INTEGER , Mar INTEGER , Apr INTEGER , May INTEGER , Jun INTEGER ); INSERT...INTO monthly_sales VALUES ( 1 , 'electronics' , 1 , 2 , 3 , 4 , 5 , 6 ), ( 2 , 'clothes' , 10 , 20 , 30 , 40 , 50 , 60 ), ( 3 , 'cars' , 100..., 200 , 300 , 400 , 500 , 600 ); FROM monthly_sales ; empid dept Jan Feb Mar Apr May Jun 1 electronics 1 2 3 4 5 6 2 clothes 10 20 30 40 50 60 3 cars 100 200 300 400 500 600... - https://man.mtool.work/duckdb/1.3/sql/statements/unpivot.html
- Pivot Internals – DuckDB 9157
- 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
...namically unpivoting, the COLUMNS expression is evaluated first to calculate the column list. For example: UNPIVOT monthly_sales ON jan , feb , mar , apr , may , jun INTO NAME month VALUE sales ; is translated into: SELECT empid , dept , unnest ([ 'ja...n' , 'feb' , 'mar' , 'apr' , 'may' , 'jun' ]) AS month , unnest ([ "jan" , "feb" , "mar" , "apr" , "may" , "jun" ]) AS sales FROM monthly_sales ; Note the single quotes to build a list of text strings to populate month , and the double quotes to p...ull the column values for use in sales . This produces the same result as the initial example: empid dept month sales 1 electronics jan 1 1 electronics feb 2 1 e... - https://man.mtool.work/duckdb/1.3/internals/pivot.html
- Window Functions – DuckDB 8609
- 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
...by major SQL database systems. Examples Generate a row_number column to enumerate rows: SELECT row_number () OVER () FROM sales ; Tip If you only need a number for each row in a table, you can use the rowid pseudocolumn . Generate a row_number column...to enumerate rows, ordered by time : SELECT row_number () OVER ( ORDER BY time ) FROM sales ; Generate a row_number column to enumerate rows, ordered by time and partitioned by region : SELECT row_number () OVER (...PARTITION BY region ORDER BY time ) FROM sales ; Compute the difference between the current and the previous-by- time amount : SELECT amount - lag ( amount ) OVER ( ORDE... - https://man.mtool.work/duckdb/1.3/sql/functions/window_functions.html
- Aggregate Functions – DuckDB 8317
- 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
...down Aggregate Functions 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 sale...s GROUP BY region ; Return only the regions that have a sum of amount higher than 100: SELECT region FROM sales GROUP BY region HAVING sum ( amount ) > 100 ; Return the number of unique values in the region column: SELECT count ( DIST...INCT region ) FROM sales ; Return two values, the total sum of amount and the sum of amount minus columns where the region is north using the FILTE... - https://man.mtool.work/duckdb/1.3/sql/functions/aggregates.html
- SELECT Clause – DuckDB 7823
- 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
...Functions Generate a row_number column containing incremental identifiers for each row: SELECT row_number () OVER () FROM sales ; Compute the difference between the current amount, and the previous amount, by order of time: SELECT amount - lag ( amou...nt ) OVER ( ORDER BY time ) FROM sales ; Window functions are special functions that allow the computation of values relative to other rows in a result. Window f... - https://man.mtool.work/duckdb/1.3/sql/query_syntax/select.html
- SQLite Extension – DuckDB 7768
- 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
...ry city country customer customer_list film film_actor film_category film_list film_text inventory language payment rental sales_by_film_category sales_by_store staff staff_list store You can query the tables using SQL, e.g., using the example queries... - https://man.mtool.work/duckdb/1.3/core_extensions/sqlite.html
PREV
1
NEXT
DuckDB 1.3 Documentation / man.mtool.work