zlacker

[return to "Pipe Syntax in SQL"]
1. tmoert+69[view] [source] 2024-08-24 16:40:48
>>legran+(OP)
I'm glad to see pipe syntax moving forward! In my time at Google, I wrote a lot of SQL queries that required a long sequence of intermixed filtering, grouping, aggregation, and analytic window operations. But the ordering of those operations rarely matched SQL's inside-out syntax, so I commonly had to chop up my logic and glue it into multiple chained CTEs. This busywork made my code's logic harder to follow and was frustrating, especially since I was familiar with alternative coding models, such as R's dplyr, that would have allowed me to express my logic as a simple linear pipeline.

I hope SQL pipes become commonplace so that I can use them anywhere I have to write SQL queries.

◧◩
2. humanf+VG4[view] [source] 2024-08-26 13:28:28
>>tmoert+69
I upvote you for using CTEs. It can be so powerful.
[go to top]