WITH my_cte AS (
SELECT \* FROM VALUES
(1, 'column 2 value', 3.0),
(2, 'column 2 value', 3.0),
(3, 'column 2 value', 3.0),
(4, 'column 2 value', 3.0)
)
you can often alias the VALUES values like: WITH my_cte AS (
SELECT \* FROM VALUES
(1, 'column 2 value', 3.0),
(2, 'column 2 value', 3.0),
(3, 'column 2 value', 3.0),
(4, 'column 2 value', 3.0)
as t(col1_name, col2_name, col3_name)
)
and some DB's allow you to alias via the cte name: WITH my_cte(col1_name, col2_name, col3_name) AS (
SELECT \* FROM VALUES
(1, 'column 2 value', 3.0),
(2, 'column 2 value', 3.0),
(3, 'column 2 value', 3.0),
(4, 'column 2 value', 3.0)
)
The bigger problem, is the "over use of tools to boost developers" the real problem, is putting poor developers into the pipeline. complex analytics is SQL is just simple, and lovely. The fact other struggle is not going to be helped by pretending the "code" looks more C like, they need to learn to think like a performant machine, and then be productive.