Results of 1 - 10 of about 21 for sort (0.005 sec.)
- List Functions 14630
- Function Description list[index] Extracts a single list element using a (1-based) index . list[begin[:end][:step]] Extracts a sublist using slice conventions . Negative values are accepted. list1 && list2 Alias for list_has_any . list1 <->
...e . array_resize(list, size[[, value]]) Alias for list_resize . array_reverse(list) Alias for list_reverse . array_reverse_sort(list[, col1]) Alias for list_reverse_sort . array_select(value_list, index_list) Alias for list_select . array_slice(list,...begin, end) Alias for list_slice . array_slice(list, begin, end, step) Alias for list_slice . array_sort(list[, col1][, col2]) Alias for list_sort . array_to_string(list, delimiter) Concatenates list/array elements using an opt...ples . list_first(list) Applies aggregate function first to the list . list_grade_up(list[, col1][, col2]) Works like list_sort , but the results are the indexes that correspond to the position in the original list instead of the actual values. list_... - https://man.mtool.work/duckdb/2.0/sql/functions/list.html
- Utility Functions 11315
- Scalar Utility Functions The functions below are difficult to categorize into specific function types and are broadly useful. Name Description alias(column) Return the name of the column. can_cast_implicitly(source_value, target_value) Whet
...se, return arg1 . count_if(x) Aggregate function; returns the number of rows where the BOOLEAN argument x is true . create_sort_key(parameters...) Constructs a binary-comparable sort key based on a set of input parameters and sort qualifiers. current...ot set. hash(value) Returns a UBIGINT with a hash of value . The used hash function may change across DuckDB versions. icu_sort_key(string, collator) Surrogate sort key used to sort special characters according to the specific locale. Collator parame...; returns the number of rows where the BOOLEAN argument x is true . | | Example | count_if(42 > 0) | | Result | 1 | create_sort_key(parameters...) | Description | Constructs a binary-comparable sort key based on a set of input parameters and sort qua... - https://man.mtool.work/duckdb/2.0/sql/functions/utility.html
- Non-Deterministic Behavior 9573
- Several operators in DuckDB exhibit non-deterministic behavior. Most notably, SQL uses set semantics, which allows results to be returned in a different order. DuckDB exploits this to improve performance, particularly when performing multi-
...u can use the ORDER BY ALL clause : sql SELECT * FROM ( SELECT 'A' AS x UNION SELECT 'B' AS x ) ORDER BY ALL; You can also sort lists using list_sort : sql SELECT list_sort(array_distinct(['A', 'A', 'B', NULL, NULL])) AS i ORDER BY i; It's also possi... - https://man.mtool.work/duckdb/2.0/operations_manual/non-deterministic_behavior.h...
- Variant Functions 9386
- This section describes functions that operate on the VARIANT type . New Most variant_* functions were introduced in DuckDB 2.0. The variant_extract , variant_normalize and variant_typeof functions were already available in DuckDB 1.5. Name
...ck, needle) Return whether the needle VARIANT is contained in the haystack VARIANT . variant_comparator(v) Return a binary sort key that orders a VARIANT value by the logical ordering of VARIANT values. variant_normalize(v) Return a canonical represe...:VARIANT, '{"user": {"id": 42}}'::JSON::VARIANT) | | Result | true | variant_comparator(v) | Description | Return a binary sort key (a BLOB ) that orders a VARIANT value according to the logical ordering of VARIANT values. This is used internally so...that VARIANT s compare and sort consistently with the corresponding native DuckDB types, rather than by their internal byte representation. | | Example |... - https://man.mtool.work/duckdb/2.0/sql/functions/variant.html
- Python Client API 9302
- Connection class duckdb. Appender Bases: object append_row ( self , * args ) → None Buffer one row, one value per column, each converted as an executemany parameter would be append_rows ( self , rows : object ) → None Buffer each row of an
...ender_mode : object = None ) → None Display a summary of the data. Detailed examples can be found at Relational API page . sort ( * args : object ) → DuckDBPyRelation Reorder the relation object by the provided expressions. Detailed examples can be f...ey were asked for. as_select ( ) → str The SQL for a select list, carrying the alias if there is one. asc ( ) → Expression Sort ascending. Keeps any null order already set. avg ( * args : ValueOrExpr ) → Expression The average of the values. The same...ntrusted input. type is the earlier API's name for the same argument. collate ( collation : str ) → Expression Compare and sort by a collation, such as nocase ; nocase.noaccent combines two. concat ( * others : object ) → Expression Join text values.... - https://man.mtool.work/duckdb/2.0/clients/python/reference/
- ORDER BY Clause 8439
- ORDER BY is an output modifier. Logically it is applied near the very end of the query (just prior to LIMIT or OFFSET , if present). The ORDER BY clause sorts the rows on the sorting criteria in either ascending or descending order. In addi
...er ( NULLS FIRST or NULLS LAST , default is NULLS LAST ). ORDER BY ALL The ALL keyword indicates that the output should be sorted by every column in order from left to right. The direction of this sort may be modified using either ORDER BY ALL ASC or...ther expressions in the ORDER BY clause – it must be by itself. See examples below. NULL Order Modifier By default, DuckDB sorts ASC and NULLS LAST , i.e., the values are sorted in ascending order and NULL values are placed last. For the default ASC...t value). To match PostgreSQL in both directions, set default_null_order = 'NULLS_LAST_ON_ASC_FIRST_ON_DESC' . The default sort order can be changed with the following configuration options. Use the default_null_order option to change the default NUL... - https://man.mtool.work/duckdb/2.0/sql/query_syntax/orderby.html
- Expression API 8169
- The Expression class represents an instance of an expression . Why Would I Use the Expression API? Use expressions to build filters and computed columns in Python. They are useful when column names or conditions depend on your code. import
...0).fetchall()) [('hammer', 42)] An expression is passed to a method of a relation , such as select , filter , aggregate or sort . str() of an expression returns its SQL text, with the identifiers quoted and every operation in parentheses: print((col(..., DATE '2024-05-01' AS d, [3, 1, 2] AS l") print(rel.select( col("s").str().upper(), col("d").dt().year(), col("l").list().sort(), ).fetchall()) [('DUCK', 2024, [1, 2, 3])] Common Operations The Expression class also contains many operations that can...ther the expression is NULL .is_not_null() Checks whether the expression is not NULL .collate(collation: str) Compares and sorts by a collation , such as nocase .concat(*values) Concatenates text values [key] Takes a field of a STRUCT by name, an ele... - https://man.mtool.work/duckdb/2.0/clients/python/expression.html
- Unit Tester Configuration 8169
- There are three ways of setting options for the unit tester: Command Line Arguments Configuration File Environment Variables Configuration Options List See the Configuration Options List for the full list of available options. Command Line
...e sets are OR'd) --skip-tag-set <comma-separated strings> Skip tests which match all named tags (multiple sets are OR'd) --sort-style <none|rowsort|valuesort> Default sort style if none is configured in the test --statically-loaded-extensions <comma-... - https://man.mtool.work/duckdb/2.0/dev/sqllogictest/test_configuration.html
- SET and RESET Statements 8000
- The SET statement modifies the provided DuckDB configuration option at the specified scope. Examples Update the memory_limit configuration value: SET memory_limit = '10GB'; Configure the system to use 1 thread: SET threads = 1; Or use the T
...Set the default collation for the session: SET SESSION default_collation = 'nocase'; Set a Global Variable Set the default sort order globally: SET GLOBAL default_order = 'DESC'; Set the default threads globally: SET GLOBAL threads = 4; Syntax SET up... - https://man.mtool.work/duckdb/2.0/sql/statements/set.html
- R-Tree Indexes 7915
- The spatial extension provides support for spatial indexing through the R-tree extension index type. Why Should I Use an R-Tree Index? When working with geospatial datasets, it is very common that you want to filter rows based on their spat
...p with a specific region of interest. Unfortunately, even though DuckDB's vectorized execution engine is pretty fast, this sort of operation does not scale very well to large datasets as it always requires a full table scan to check every row in the...ee. However, when the R-tree index is created on an already populated table, a special bottom up "bulk loading algorithm" (Sort-Tile-Recursive) is used, which divides all entries into an already balanced tree as the total number of required nodes can... - https://man.mtool.work/duckdb/2.0/core_extensions/spatial/r-tree_indexes.html
DuckDB 2.0 Documentation / man.mtool.work