This is in teradata.
For many good reasons, I would like to have a something like the below, where I start by making a CTE that just has a list of literals, and then can refer to it in later statements:
with MyList(num) as(
'a','b','c','d'
)
select foo from mytable where x in ( select(num) from MyList))
This is a very contrived example, and I know that it would have few applications in reality. But it does get at the question.
Thanks!