|
|
|
|
|
by data_ders
119 days ago
|
|
I agree that CTEs help solve the problem of being able to read a SQL query from top to bottom, but I wouldn't say they're a panacea! Personally, it's weird to me that `FROM` (scan) comes after `SELECT` (projection). IMHO the datasource should come first! CTEs don't solve this problem they just let you chain multiple SELECTs together. A real use case is that it would allow intellisense to kick in a lot earlier! Instead you have to write `SELECT * FROM my_table` and only after can you edit the `*` and get auto-complete suggestions of the columns from `my_table` |
|
They kind of do in my head. "WITH" reads to me exactly like the datasource you are looking for.