zlacker

[parent] [thread] 8 comments
1. richbe+(OP)[view] [source] 2024-08-24 16:30:33
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)

I don't love the multiple WHEREs.

replies(4): >>abelch+Xr >>virapt+zX >>RaftPe+dg2 >>mr_toa+Ptc
2. abelch+Xr[view] [source] 2024-08-24 20:07:25
>>richbe+(OP)
duckDB is what sql should be in 2024

https://duckdbsnippets.com/

replies(1): >>xigoi+iH1
3. virapt+zX[view] [source] 2024-08-25 00:10:12
>>richbe+(OP)
Duckdb also supports prql with an extension https://github.com/ywelsch/duckdb-prql
◧◩
4. xigoi+iH1[view] [source] [discussion] 2024-08-25 09:31:40
>>abelch+Xr
The very first example on that page is vulnerable to injection.
replies(1): >>richbe+1m2
5. RaftPe+dg2[view] [source] 2024-08-25 15:37:28
>>richbe+(OP)
That'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.
◧◩◪
6. richbe+1m2[view] [source] [discussion] 2024-08-25 16:11:39
>>xigoi+iH1
Which one?
replies(1): >>xigoi+bo2
◧◩◪◨
7. xigoi+bo2[view] [source] [discussion] 2024-08-25 16:24:17
>>richbe+1m2

  #!/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);" }
replies(1): >>richbe+mD3
◧◩◪◨⬒
8. richbe+mD3[view] [source] [discussion] 2024-08-26 01:59:46
>>xigoi+bo2
Eh, 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.

9. mr_toa+Ptc[view] [source] 2024-08-29 04:33:23
>>richbe+(OP)
SQL was supposed to follow English grammar. Having FROM before SELECT is like having “Begun” before “these clone wars have.”
[go to top]