Results of 1 - 7 of about 7 for coalesce (0.003 sec.)
- NULL Values 13195
- NULL values are special values that are used to represent missing data in SQL. Columns of any type can contain NULL values. Logically, a NULL value can be seen as “the value of this field is unknown”. A NULL value can be inserted to any fie
...L; true NULL and Functions A function that has an input argument as NULL usually returns NULL . SELECT cos(NULL); NULL The coalesce function is an exception to this: it takes any number of arguments, and returns for each row the first argument that is no...t NULL . If all arguments are NULL , coalesce also returns NULL . SELECT coalesce(NULL, NULL, 1); 1 SELECT coalesce(10, 20); 10 SELECT coalesce(NULL, NULL); NULL The if...null function is a two-argument version of coalesce . SELECT ifnull(NULL, 'default_string'); default_string SELECT ifnull(1, 'default_string'); 1 NULL and AND / OR NULL value... - https://man.mtool.work/duckdb/2.0/sql/data_types/nulls.html
- Star Expression 9742
- Syntax The * expression can be used in a SELECT statement to select all columns that are projected in the FROM clause. SELECT * FROM tbl; TABLE.* and STRUCT.* The * expression can be prepended by a table name to select only columns from tha
...g behavior in Python . Without UNPACK , operations on the COLUMNS expression are applied to each column separately: SELECT coalesce(COLUMNS(['a', 'b', 'c'])) AS result FROM (SELECT NULL a, 42 b, true c); result result result NULL 42 true With UNPACK , th...e COLUMNS expression is expanded into its parent expression, coalesce in the example above, which results in a single column: SELECT coalesce(UNPACK(COLUMNS(['a', 'b', 'c']))) AS result FROM (...matching Python syntax , when it is applied directly to the COLUMNS expression without any intermediate operations. SELECT coalesce(*COLUMNS(*)) AS result FROM (SELECT NULL a, 42 AS b, true AS c); result 42 Warning In the following example, replacing UNP... - https://man.mtool.work/duckdb/2.0/sql/expressions/star.html
- Utility Functions 8997
- 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
...he target value. checkpoint(database) Synchronize WAL with file for (optional) database without interrupting transactions. coalesce(expr, ...) Return the first expression that evaluates to a non- NULL value. Accepts 1 or more parameters. Each expression...en the ICU extension is installed. if(a, b, c) Ternary conditional operator. ifnull(expr, other) A two-argument version of coalesce. in_search_path(database_name, schema_name) Returns whether or not the given database and schema are in the search path. i...for (optional) database without interrupting transactions. | | Example | checkpoint(my_db) | | Result | success Boolean | coalesce(expr, ...) | Description | Return the first expression that evaluates to a non- NULL value. Accepts 1 or more parameters.... - https://man.mtool.work/duckdb/2.0/sql/functions/utility.html
- Expression API 8160
- 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
...e, *args) FunctionExpression(name, *args) star(exclude=...) StarExpression(exclude=...) sql_expr(text) SQLExpression(text) coalesce(*values) CoalesceOperator(*values) a Python function, such as lambda x: x * 2 LambdaExpression(lhs, rhs) .is_null() , .is_...──────────┘ fn also passes keyword arguments by name: fn("round", col("x"), precision=1) is round("x", "precision" := 1) . coalesce(*values) gives the first of its arguments that is not NULL . A Python function given as an argument becomes a SQL lambda ;... - https://man.mtool.work/duckdb/2.0/clients/python/expression.html
- Partitioned Writes 8070
- Examples Write a table to a Hive partitioned dataset of Parquet files: COPY orders TO 'orders' (FORMAT parquet, PARTITION_BY (year, month)); Write a table to a Hive partitioned dataset of CSV files, allowing overwrites: COPY orders TO 'orde
...TO 'sales' (FORMAT parquet, PARTITION_BY (region), PARTITION_PATH CASE WHEN region = 'eu' THEN 'europe' ELSE 'region=' || coalesce(region, 'unknown') END); The expression is evaluated once per partition and its result is cast to VARCHAR . The resulting... - https://man.mtool.work/duckdb/2.0/data/partitioning/partitioned_writes.html
- Lambda Functions 7888
- DuckDB lambda functions (a.k.a. 'lambdas' or 'lambda expressions') are expressions that define an inline anonymous function. Lambdas are passed as argument to certain list functions , which evaluate the passed lambda expression against its
...DuckDB, GooseDB, SparrowDB] Combining lambda functions with other functions: SELECT list_transform([5, NULL, 6], lambda x: coalesce(x, 0) + 1); [6, 1, 7] list_filter Examples Filter out negative values: SELECT list_filter([5, -6, NULL, 7], lambda x: x >... - https://man.mtool.work/duckdb/2.0/sql/functions/lambda.html
- Python Client API 7506
- 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
...Expression CASE WHEN condition THEN value , extended by .when(condition, value) and closed by .otherwise(value) . duckdb. coalesce ( * values : object ) → Expression The first argument that is not NULL. duckdb. CoalesceOperator ( * args : object ) → Exp... - https://man.mtool.work/duckdb/2.0/clients/python/reference/
PREV
1
NEXT
DuckDB 2.0 Documentation / man.mtool.work