⌘K ctrl+k
Search Shortcut cmd + k | ctrl + k
DuckDB 2.0 ドキュメント 全文検索
per page, with , order by , clip by
Results of 1 - 10 of about 42 for decimal (0.004 sec.)
Numeric Types 13331
Fixed-Width Integer Types The types TINYINT , SMALLINT , INTEGER , BIGINT and HUGEINT store whole numbers, that is, numbers without fractional components, of various ranges. Attempts to store values outside of the allowed range will result ... fashion as other integer types, but uses three additional bytes to store the required size and a sign bit. A number with N decimal digits requires approximately 0.415 * N + 3 bytes when stored in a BIGNUM . Unlike variable-length integer implementations ... BIGNUM : the maximal and minimal representable values are approximately ±4.27e20201778 . Those are numbers with 20,201,779 decimal digits and storing a single such number requires 8 megabytes. Fixed-Point Decimals The data type DECIMAL(WIDTH, SCALE) (al ... so available under the alias NUMERIC(WIDTH, SCALE) ) represents an exact fixed-point decimal value. When creating a value of type DECIMAL , the WIDTH and SCALE can be specified to define which size of decimal values ...
https://man.mtool.work/duckdb/2.0/sql/data_types/numeric.html
Date Format Functions 12092
The strftime and strptime functions can be used to convert between DATE / TIMESTAMP values and strings. This is often required when parsing CSV files, displaying output to the user or transferring information between programs. Because there ... name. January, February, ... %c ISO date and time representation 1992-03-02 10:30:20 %d Day of the month as a zero-padded decimal. 01, 02, ..., 31 %-d Day of the month as a decimal number. 1, 2, ..., 30 %f Microsecond as a decimal number, zero-padded o ... n the left. 000000 - 999999 %g Millisecond as a decimal number, zero-padded on the left. 000 - 999 %G ISO 8601 year with century representing the year that contains the greater p ... art of the ISO week (see %V ). 0001, 0002, ..., 2013, 2014, ..., 9998, 9999 %H Hour (24-hour clock) as a zero-padded decimal number. 00, 01, ..., 23 %-H Hour (24-hour clock) as a decimal number. 0, 1, ..., 23 %I Hour (12-hour clock) as a zero-padd ...
https://man.mtool.work/duckdb/2.0/sql/functions/dateformat.html
Types 11798
DuckDB is a strongly typed database system. As such, every column has a single type specified. This type is constant over the entire column. That is to say, a column that is labeled as an INTEGER column will only contain INTEGER values. Duc ... ost primitive types, e.g., integers or varchars, the enum is sufficient. For more complex types, such as lists, structs or decimals, the logical type must be used. typedef enum DUCKDB_TYPE { DUCKDB_TYPE_INVALID = 0, DUCKDB_TYPE_BOOLEAN = 1, DUCKDB_TYPE_ ... AL = 15, DUCKDB_TYPE_HUGEINT = 16, DUCKDB_TYPE_UHUGEINT = 32, DUCKDB_TYPE_VARCHAR = 17, DUCKDB_TYPE_BLOB = 18, DUCKDB_TYPE_DECIMAL = 19, DUCKDB_TYPE_TIMESTAMP_S = 20, DUCKDB_TYPE_TIMESTAMP_MS = 21, DUCKDB_TYPE_TIMESTAMP_NS = 22, DUCKDB_TYPE_ENUM = 23, D ... alue functions do not support structural reading of composite types (lists or structs) or more complex types like enums or decimals. For more information about data chunks, see the documentation on data chunks . API Reference Overview duckdb_data_chunk ...
https://man.mtool.work/duckdb/2.0/clients/c/types.html
Complete API 10343
This page contains the reference for DuckDB's C API. The reference contains several deprecation notices. These concern methods whose long-term availability is not guaranteed as they may be removed in the future. That said, DuckDB's develope ... idx_t col , idx_t row ); duckdb_uhugeint duckdb_value_uhugeint ( duckdb_result * result , idx_t col , idx_t row ); duckdb_decimal duckdb_value_decimal ( duckdb_result * result , idx_t col , idx_t row ); uint8_t duckdb_value_uint8 ( duckdb_result * resu ... elpers double duckdb_uhugeint_to_double ( duckdb_uhugeint val ); duckdb_uhugeint duckdb_double_to_uhugeint ( double val ); Decimal Helpers duckdb_decimal duckdb_double_to_decimal ( double val , uint8_t width , uint8_t scale ); double duckdb_decimal_to_d ... ouble ( duckdb_decimal val ); Prepared Statements duckdb_state duckdb_prepare ( duckdb_connection connection , const char * query , duckdb_prepar ...
https://man.mtool.work/duckdb/2.0/clients/c/api.html
Conversion between DuckDB and Python 9553
This page documents the rules for converting DuckDB results to Python and Python objects to DuckDB . Result Conversion: DuckDB Results to Python A result is read from a relation or, when using the DB-API / con.execute() , from the connectio ... un the examples, use this table: import duckdb con = duckdb.connect() con.execute("CREATE TABLE items (item VARCHAR, value DECIMAL(10, 2), count INTEGER)") con.execute(""" INSERT INTO items VALUES ('jeans', 20.0, 1), ('hammer', 42.2, 2), ('laptop', 2000 ... Logical Types : None → NULL bool → BOOLEAN datetime.timedelta → INTERVAL str → VARCHAR bytearray → BLOB memoryview → BLOB decimal.Decimal → DECIMAL / DOUBLE / FLOAT uuid.UUID → UUID The rest of the conversion rules are as follows. str A str that UTF-8 ... iew: underlying buffer is not C-contiguous . values() and expressions accept it and read its bytes in order, here b'ace' . decimal.Decimal A Decimal becomes a DECIMAL whose width and scale follow from its digits and its exponent: Decimal("12.5") is a DE ...
https://man.mtool.work/duckdb/2.0/clients/python/conversion.html
Numeric Functions 9088
Numeric Operators The table below shows the available mathematical operators for numeric types . Operator Description Example Result + Addition 2 + 3 5 - Subtraction 2 - 3 -1 * Multiplication 2 * 3 6 / Float division 5 / 2 2.5 // Division 5 ... eil . cos(x) Computes the cosine of x . cosh(x) Computes the hyperbolic cosine of x . cot(x) Computes the cotangent of x . decimal_division(x, y) Divides x by y using exact decimal arithmetic, returning a DECIMAL . degrees(x) Converts radians to degrees ... a random number x in the range 0.0 <= x < 1.0 . round_even(v NUMERIC, s INTEGER) Alias of roundbankers(v, s) . Round to s decimal places using the rounding half to even rule . Values s < 0 are allowed. roundbankers(v NUMERIC, s INTEGER) Alias of round_ ... even(v, s) . Round to s decimal places using the rounding half to even rule . Values s < 0 are allowed. round(v NUMERIC, s INTEGER) Round to s decimal pla ...
https://man.mtool.work/duckdb/2.0/sql/functions/numeric.html
Values 8624
The value class represents a single value of any type. API Reference Overview void duckdb_destroy_value ( duckdb_value * value ); duckdb_value duckdb_create_varchar ( const char * text ); duckdb_value duckdb_create_varchar_length ( const ch ... _uhugeint ( duckdb_uhugeint input ); duckdb_value duckdb_create_bignum ( duckdb_bignum input ); duckdb_value duckdb_create_decimal ( duckdb_decimal input ); duckdb_value duckdb_create_float ( float input ); duckdb_value duckdb_create_double ( double inp ... ); duckdb_uhugeint duckdb_get_uhugeint ( duckdb_value val ); duckdb_bignum duckdb_get_bignum ( duckdb_value val ); duckdb_decimal duckdb_get_decimal ( duckdb_value val ); float duckdb_get_float ( duckdb_value val ); double duckdb_get_double ( duckdb_va ... s input : The duckdb_bignum value Return Value The value. This must be destroyed with duckdb_destroy_value . duckdb_create_decimal Creates a DECIMAL value from a duckdb_decimal Syntax duckdb_value duckdb_create_decimal ( duckdb_decimal input ); Paramete ...
https://man.mtool.work/duckdb/2.0/clients/c/value.html
ODBC Extension Functions 8593
odbc_begin_transaction odbc_bind_params odbc_close odbc_commit odbc_connect odbc_copy odbc_create_params odbc_list_data_sources odbc_list_drivers odbc_query odbc_rollback odbc_begin_transaction odbc_begin_transaction(conn_handle BIGINT) -> ... estination RDBMS types, example: create_table=TRUE, column_types=MAP { 'DUCKDB_TYPE_VARCHAR': 'VARCHAR2(10)', 'DUCKDB_TYPE_DECIMAL': 'NUMBER({typmod1},{typmod2})'} column_quotes ( VARCHAR , default: " ): quotation character (or string) to be used to quo ... T after executing CREATE TABLE , enabled automatically for Firebird Optional named parameters (query parameters handling): decimal_params_as_chars ( BOOLEAN , default: false ): pass DECIMAL parameters as VARCHAR s integral_params_as_decimals ( BOOLEAN , ... e set automatically. They also can be passed as named parameters to odbc_query function to override the autoconfiguration: decimal_columns_as_chars ( BOOLEAN , default: false ): read DECIMAL values as VARCHAR s that are parsed back into DECIMAL s before ...
https://man.mtool.work/duckdb/2.0/core_extensions/odbc/functions.html
Literal Types 8423
DuckDB has special literal types for representing NULL , integer and string literals in queries. These have their own binding and conversion rules. Prior to DuckDB version 0.10.0, integer and string literals behaved identically to the INTEG ... can be implicitly converted to any other type. Integer Literals Integer literals are denoted as a sequence of one or more decimal digits. At runtime, these result in values of the INTEGER_LITERAL type. INTEGER_LITERAL types can be implicitly converted ... literal 42 can be implicitly converted to a TINYINT , but the integer literal 1000 cannot be. DuckDB does not support hexadecimal or binary literals directly. However, strings or string literals in hexadecimal or binary notation with 0x or 0b prefixes ... pes, e.g., '0xFF'::INT = 255 or '0b101'::INT = 5 . Other Numeric Literals Non-integer numeric literals can be denoted with decimal notation, using the period character ( . ) to separate the integer part and the decimal part of the number. Either the int ...
https://man.mtool.work/duckdb/2.0/sql/data_types/literal_types.html
Summarize 8005
The SUMMARIZE command can be used to easily compute a number of aggregates over a table or a query. The SUMMARIZE command launches a query that computes a number of aggregates over all columns ( min , max , approx_unique , avg , std , q25 , ... 2501 4999 7500 6001215 0.00 l_linenumber INTEGER 1 7 7 3.0005757167506912 1.7324314036519328 2 3 4 6001215 0.00 l_quantity DECIMAL(15,2) 1.00 50.00 50 25.507967136654827 14.426262537016918 13 26 38 6001215 0.00 l_extendedprice DECIMAL(15,2) 901.00 10494 ... 9.50 923139 38255.138484656854 23300.43871096221 18756 36724 55159 6001215 0.00 l_discount DECIMAL(15,2) 0.00 0.10 11 0.04999943011540163 0.03161985510812596 0 0 0 6001215 0.00 l_tax DECIMAL(15,2) 0.00 0.08 9 0.0400135089 ...
https://man.mtool.work/duckdb/2.0/guides/meta/summarize.html
PREV 1 2 3 4 5 NEXT
DuckDB 2.0 Documentation / man.mtool.work