79439574

Date: 2025-02-14 13:51:48
Score: 1.5
Natty:
Report link

The table-value constructor inside a CTE is a bit tricky because SQL syntax doesn’t directly support it in the way you’re attempting.

The best way to do this is to explicitly define column names within the VALUES clause itself inside the WITH statement.

Here’s the correct way to write your query: https://runsql.com/r/7f9d71d458eb7adf

Notice that the alias t (e, f) must be explicitly added after the VALUES clause inside the SELECT * FROM subquery.

Reasons:
  • No code block (0.5):
  • Low reputation (1):
Posted by: Patrick Nguyen