Aggregate rows into a sorted list.SQL

Michael Simons

Copy code

Expand

Share link

if you were to export a table as a csv, this query should estimate the size (minus the header)SQL

Hamilton Ulmer

Copy code

Expand

Share link

Convert CSV to Parquet and amend the schemaSQL

Robin Moffatt

Copy code

Expand

Share link

Remove duplicatesSQL

Octavian Zarzu

Copy code

Expand

Share link

Creating parameterized views with TVFs macros (Table-Valued functions)SQL

Octavian Zarzu

Copy code

Expand

Share link

Split a String and cast all elements to a desired datatypeSQL

Michael Simons

Copy code

Expand

Share link

Convert EPOC integer field to TimestampSQL

Editor's note: date/time conversion can be painful in SQL and in many programming languages. Simon shows you how to handle it in DuckDB here, with timezone values. There are other timestamp without timezone functions in the DuckDB docs.

Simon Aubury

Expand

Share link

Convert CSV to Parquet and provide schema to useBash

Editor's note: while there are other snippets showing file conversion, Parth's shows you how to convert from CSV to Parquet files using DuckDB with specification of the entire schema (columns) and compression codec.

Parth Patil

Expand

Share link