3 ms·
IMO having SELECT before FROM is one of SQL's biggest mistakes. I would gladly welcome a new syntax that rectifies this. (Also https://duckdb.org/2022/05/04/fri
by richbell 2y ago
IMO having SELECT before FROM is one of SQL's biggest mistakes. I would gladly welcome a new syntax that rectifies this. (Also https://duckdb.org/2022/05/04/friendlier-sql.html https://duckdb.org/2022/05/04/friendlier-sql.html)
I don't love the multiple WHEREs.
- abelcha 2y agoduckDB is what sql should be in 2024 https://duckdbsnippets.com/ https://duckdbsnippets.com/
- xigoi 2y agoThe very first example on that page is vulnerable to injection.
- richbell 2y agoWhich one?
- xigoi 2y ago#!/bin/bash function csv_to_parquet() { file_path="$1" duckdb -c "COPY (SELECT * FROM read_csv_auto('$file_path')) TO '${file_path%.*}.parquet' (FORMAT PARQUET);" }
- richbell 2y agoEh, in the context of the site and other snippets that seems pedantic. Could it be run on untrusted user input? Sure. Does it actually pose a threat? It's improbable.
- viraptor 2y agoDuckdb also supports prql with an extension https://github.com/ywelsch/duckdb-prql https://github.com/ywelsch/duckdb-prql
- RaftPeople 2y agoThat's a great list of friendlier sql in DuckDB. For most of that list I either run into it regularly or have wanted the exact fix they have.
- mr_toad 2y agoSQL was supposed to follow English grammar. Having FROM before SELECT is like having “Begun” before “these clone wars have.”