⌘K ctrl+k
Search Shortcut cmd + k | ctrl + k
DuckDB 2.0 ドキュメント 全文検索
per page, with , order by , clip by
Results of 1 - 7 of about 7 for percent (0.005 sec.)
Pattern Matching 11887
There are four separate approaches to pattern matching provided by DuckDB: the traditional SQL LIKE operator , the more recent SIMILAR TO operator (added in SQL:1999), a GLOB operator , and POSIX-style regular expressions . LIKE The LIKE ex ... f LIKE returns true , and vice versa. An equivalent expression is NOT (string LIKE pattern) .) If pattern does not contain percent signs or underscores, then the pattern only represents the string itself; in that case LIKE acts like the equals operator. ... An underscore ( _ ) in pattern stands for (matches) any single character; a percent sign ( % ) matches any sequence of zero or more characters. LIKE pattern matching always covers the entire string. Therefo ... re, if it's desired to match a sequence anywhere within a string, the pattern must start and end with a percent sign. Some examples: SELECT 'abc' LIKE 'abc'; -- true SELECT 'abc' LIKE 'a%' ; -- true SELECT 'abc' LIKE '_b_'; -- true SE ...
https://man.mtool.work/duckdb/2.0/sql/functions/pattern_matching.html
Samples 11632
Samples are used to randomly select a subset of a dataset. Examples Select a sample of exactly 5 rows from tbl using reservoir sampling: SELECT * FROM tbl USING SAMPLE 5; Select a sample of approximately 10% of the table using system sampli ... ng: SELECT * FROM tbl USING SAMPLE 10%; Warning By default, when you specify a percentage, each vector is included in the sample with that probability. If your table contains fewer than ~10k rows, it makes sen ... lies the probability to each row independently. Even then, you'll sometimes get more and sometimes less than the specified percentage of the number of rows, but it is much less likely that you get no rows at all. To get exactly 10% of rows (up to roundi ... ling option. Select a sample of approximately 10% of the table using bernoulli sampling: SELECT * FROM tbl USING SAMPLE 10 PERCENT (bernoulli); Select a sample of exactly 10% (up to rounding) of the table using reservoir sampling: SELECT * FROM tbl USIN ...
https://man.mtool.work/duckdb/2.0/sql/samples.html
Relational API 9433
The Relational API builds a query one step at a time from Python. A relation, a DuckDBPyRelation , is a piece of SQL text: the methods of the Transformation and Functions sections return a new relation whose text extends the one they were c ... lues are explicit. project Alias of select() . rename Rename columns, given as old=new. sample A random subset: n rows, or percent of them, with seed repeating a draw. select Project the relation object by the projection in project_expr. select_dtypes A ... ools │ 89 │ true │ └───────┴─────────────┴──────────┴────────────┴──────────┘ sample sample(self, n: int | None = None, *, percent: float | None = None, seed: int | None = None, method: str | None = None) -> DuckDBPyRelation A random subset: n rows, or ... ry run only when DuckDB runs on one thread. Parameters n : int, default: None The number of rows to draw; give either n or percent . * percent : float, keyword-only, default: None The percentage of the rows to draw. * seed : int, keyword-only, default: ...
https://man.mtool.work/duckdb/2.0/clients/python/relational_api.html
Text Functions 7961
Text Functions and Operators This section describes functions and operators for examining and manipulating STRING values . Function Description string[index] Extracts a single character using a (1-based) index . string[begin:end] Extracts a ... in the string . upper(string) Converts string to upper case. url_decode(string) Decodes a URL from a representation using Percent-Encoding . url_encode(string) Encodes a URL to a representation using Percent-Encoding . string[index] | Description | Ext ... ello') | | Result | HELLO | | Alias | ucase | url_decode(string) | Description | Decodes a URL from a representation using Percent-Encoding . | | Example | url_decode('https%3A%2F%2Fduckdb.org%2Fwhy_duckdb%23portable') | | Result | https://duckdb.org/wh ... y_duckdb#portable | url_encode(string) | Description | Encodes a URL to a representation using Percent-Encoding . | | Example | url_encode('this string has/ special+ characters>') | | Result | this%20string%20has%2F%20special ...
https://man.mtool.work/duckdb/2.0/sql/functions/text.html
Window Functions 7961
DuckDB supports window functions , which can use multiple rows to calculate a value for each row. Window functions are blocking operators , i.e., they require their entire input to be buffered, making them one of the most memory-intensive o ... en the current and the previous-by- time amount : SELECT amount - lag(amount) OVER (ORDER BY time) FROM sales; Compute the percentage of the total amount of sales per region for each row: SELECT amount / sum(amount) OVER (PARTITION BY region) FROM sales ... num_buckets[ ORDER BY ordering]) An integer ranging from 1 to num_buckets , dividing the partition as equally as possible. percent_rank([ORDER BY ordering]) The relative rank of the current row: (rank() - 1) / (total partition rows - 1) . rank([ORDER BY ... hin the frame using the provided ordering instead of the frame ordering. | | Return type | BIGINT | | Example | ntile(4) | percent_rank([ORDER BY ordering]) | Description | The relative rank of the current row: (rank() - 1) / (total partition rows - 1) ...
https://man.mtool.work/duckdb/2.0/sql/functions/window_functions.html
Python Client API 7470
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 ... on object by order_expr, which is SQL order text or an expression. Detailed examples can be found at Relational API page . percent_rank ( window_spec : str , projected_columns : str = '' ) → DuckDBPyRelation Computes the relative rank within the partiti ... number within the partition. Detailed examples can be found at Relational API page . sample ( n : int | None = None , * , percent : float | None = None , seed : int | None = None , method : str | None = None ) → DuckDBPyRelation A random subset: n rows ... , or percent of them, with seed repeating a draw. Detailed examples can be found at Relational API page . select ( * args : object , gr ...
https://man.mtool.work/duckdb/2.0/clients/python/reference/
Partitioned Writes 7215
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 ... UUID in the rare event that it does (to avoid clashes). Handling Slashes in Columns To handle slashes in column names, use Percent-Encoding implemented by the url_encode function . ...
https://man.mtool.work/duckdb/2.0/data/partitioning/partitioned_writes.html
PREV 1 NEXT
DuckDB 2.0 Documentation / man.mtool.work