Results of 1 - 10 of about 75 for count (0.006 sec.)
- Aggregate Functions – DuckDB 11961
- 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
...n FROM sales GROUP BY region HAVING sum ( amount ) > 100 ; Return the number of unique values in the region column: SELECT count ( DISTINCT region ) FROM sales ; Return two values, the total sum of amount and the sum of amount minus columns where the...d, only distinct values are considered in the computation of the aggregate. This is typically used in combination with the count aggregate to get the number of distinct elements; but it can be used together with any aggregate function in the system. T...For example: CREATE TABLE tbl AS SELECT s FROM range ( 1 , 4 ) r ( s ); SELECT string_agg ( s , ', ' ORDER BY s DESC ) AS countdown FROM tbl ; countdown 3, 2, 1 Handling NULL Values All general aggregate functions ignore NULL s, except for list ( arr... - https://man.mtool.work/duckdb/1.3/sql/functions/aggregates.html
- FILTER Clause – DuckDB 11156
- 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
...es Return the following: The total number of rows The number of rows where i <= 5 The number of rows where i is odd SELECT count () AS total_rows , count () FILTER ( i <= 5 ) AS lte_five , count () FILTER ( i % 2 = 1 ) AS odds FROM generate_series ( 1..., 10 ) tbl ( i ); total_rows lte_five odds 10 5 5 Simply counting rows that satisfy a condition can also be achieved without FILTER clause, using the boolean sum aggregate function, e.g...s * 0.5 THEN 2023 WHEN i <= rows * 0.75 THEN 2024 WHEN i <= rows * 0.875 THEN 2025 ELSE NULL END AS year FROM ( SELECT i , count ( * ) OVER () AS rows FROM generate_series ( 1 , 100_000_000 ) tbl ( i ) ) tbl ; “Pivot” the data out by year (move each y... - https://man.mtool.work/duckdb/1.3/sql/query_syntax/filter.html
- Text Functions – DuckDB 11086
- 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
...characters in the string . instr(string, search_string) Returns location of first occurrence of search_string in string , counting from 1. Returns 0 if no match found. lcase(string) Converts string to lower case. least(arg1, ...) Returns the smallest...that uppercase characters are considered smaller than lowercase characters and collations are not supported. left(string, count) Extracts the left-most count characters. left_grapheme(string, count) Extracts the left-most count grapheme clusters. len...racter is used to search for wildcard characters in the string . lower(string) Converts string to lower case. lpad(string, count, character) Pads the string with the character on the left until it has count characters. Truncates the string on the righ... - https://man.mtool.work/duckdb/1.3/sql/functions/text.html
- Complete API – DuckDB 10753
- 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
...y , bool qualified ); Configuration duckdb_state duckdb_create_config ( duckdb_config * out_config ); size_t duckdb_config_count (); duckdb_state duckdb_get_config_flag ( size_t index , const char ** out_name , const char ** out_description ); duckdb_...esult result ); duckdb_logical_type duckdb_column_logical_type ( duckdb_result * result , idx_t col ); idx_t duckdb_column_count ( duckdb_result * result ); idx_t duckdb_row_count ( duckdb_result * result ); idx_t duckdb_rows_changed ( duckdb_result *...b_result result , idx_t chunk_index ); bool duckdb_result_is_streaming ( duckdb_result result ); idx_t duckdb_result_chunk_count ( duckdb_result result ); duckdb_result_type duckdb_result_return_type ( duckdb_result result ); Safe Fetch Functions bool... - https://man.mtool.work/duckdb/1.3/clients/c/api.html
- Query – DuckDB 10002
- 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
...clean up the result. Elements can be extracted from the duckdb_result object using a variety of methods. The duckdb_column_count can be used to extract the number of columns. duckdb_column_name and duckdb_column_type can be used to extract the names a..._chunk ( res ); if ( ! result ) { // result is exhausted break ; } // get the number of rows from the data chunk idx_t row_count = duckdb_data_chunk_get_size ( result ); // get the first column duckdb_vector col1 = duckdb_data_chunk_get_vector ( resul...; uint64_t * col2_validity = duckdb_vector_get_validity ( col2 ); // iterate over the rows for ( idx_t row = 0 ; row < row_count ; row ++ ) { if ( duckdb_validity_row_is_valid ( col1_validity , row )) { printf ( "%d" , col1_data [ row ]); } else { pri... - https://man.mtool.work/duckdb/1.3/clients/c/query.html
- Types – DuckDB 9669
- 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
...b_result result , idx_t chunk_index ); bool duckdb_result_is_streaming ( duckdb_result result ); idx_t duckdb_result_chunk_count ( duckdb_result result ); duckdb_result_type duckdb_result_return_type ( duckdb_result result ); Date Time Timestamp Helpe...kdb_logical_type duckdb_create_union_type ( duckdb_logical_type * member_types , const char ** member_names , idx_t member_count ); duckdb_logical_type duckdb_create_struct_type ( duckdb_logical_type * member_types , const char ** member_names , idx_t...member_count ); duckdb_logical_type duckdb_create_enum_type ( const char ** member_names , idx_t member_count ); duckdb_logical_type du... - https://man.mtool.work/duckdb/1.3/clients/c/types.html
- Iceberg Extension – DuckDB 8585
- 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
...data.json,%s%s.metadata.json' Controls how versions are converted to metadata file names Querying Individual Tables SELECT count ( * ) FROM iceberg_scan ( 'data/iceberg/lineitem_iceberg' , allow_moved_paths = true ); count_star() 51793 The allow_moved...he query, in this example the manifest version is a UUID. To do so, navigate to the data/iceberg directory and run: SELECT count ( * ) FROM iceberg_scan ( 'lineitem_iceberg/metadata/v1.metadata.json' ); count_star() 60175 The iceberg works together wi...httpfs extension or the azure extension to access Iceberg tables in object stores such as S3 or Azure Blob Storage. SELECT count ( * ) FROM iceberg_scan ( 's3://bucketname/lineitem_iceberg/metadata/v1.metadata.json' ); Access Iceberg Metadata To acces... - https://man.mtool.work/duckdb/1.3/core_extensions/iceberg/overview.html
- Hugging Face Support – DuckDB 8321
- 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 data ; Multiple Files To query all files under a specific directory, you can use a glob pattern . For example: SELECT count ( * ) AS count FROM 'hf://datasets/cais/mmlu/astronomy/*.parquet' ; count 173 By using glob patterns, you can efficiently...and processing tasks. Here, you can see how you can look for questions that contain the word “planet” in astronomy: SELECT count ( * ) AS count FROM 'hf://datasets/cais/mmlu/astronomy/*.parquet' WHERE question LIKE '%planet%' ; count 21 Versioning and...ROVIDER credential_chain ); 関連キーワード datasets hf Hugging Face query parquet dataset using following examples formats count token DuckDB example command files access repositories path read format specific astronomy branch 関連するページ SQL on Ap... - https://man.mtool.work/duckdb/1.3/core_extensions/httpfs/hugging_face.html
- Multiple Python Threads – DuckDB 8321
- 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
...on ): # Create a DuckDB connection specifically for this thread local_con = duckdb_con . cursor () # Query the current row count thread_name = str ( current_thread (). name ) results = local_con . execute ( """ SELECT ? AS thread_name, count(*) AS row..._counter, current_timestamp FROM my_inserts """ , ( thread_name ,)). fetchall () print ( results ) Create Threads We define how m...to simulate simultaneous writers and readers. Note that the threads have not yet been executed, only defined. write_thread_count = 50 read_thread_count = 5 threads = [] # Create multiple writer and reader threads (in the same process) # Pass in the sa... - https://man.mtool.work/duckdb/1.3/guides/python/multiple_threads.html
- Data Chunks – DuckDB 8252
- 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 vectors. API Reference Overview duckdb_data_chunk duckdb_create_data_chunk ( duckdb_logical_type * types , idx_t column_count ); void duckdb_destroy_data_chunk ( duckdb_data_chunk * chunk ); void duckdb_data_chunk_reset ( duckdb_data_chunk chunk );...idx_t duckdb_data_chunk_get_column_count ( duckdb_data_chunk chunk ); duckdb_vector duckdb_data_chunk_get_vector ( duckdb_data_chunk chunk , idx_t col_idx ); idx_t...duckdb_destroy_data_chunk . Syntax duckdb_data_chunk duckdb_create_data_chunk ( duckdb_logical_type * types , idx_t column_count ); Parameters types : An array of column types. Column types can not contain ANY and INVALID types. column_count : The num... - https://man.mtool.work/duckdb/1.3/clients/c/data_chunk.html
DuckDB 1.3 Documentation / man.mtool.work