⌘K ctrl+k
Search Shortcut cmd + k | ctrl + k
DuckDB 1.3 ドキュメント 全文検索
per page, with , order by , clip by
Results of 1 - 1 of about 1 for odds (0.001 sec.)
FILTER Clause – DuckDB 9414
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 ... hem. Examples 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 generat ... e_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 agg ... expressions are also permitted: SELECT sum ( i ) FILTER ( i <= 5 ) AS lte_five_sum , median ( i ) FILTER ( i % 2 = 1 ) AS odds_median , median ( i ) FILTER ( i % 2 = 1 AND i <= 5 ) AS odds_lte_five_median FROM generate_series ( 1 , 10 ) tbl ( i ); l ...
https://man.mtool.work/duckdb/1.3/sql/query_syntax/filter.html
PREV 1 NEXT
DuckDB 1.3 Documentation / man.mtool.work