0
查詢的CTE:使用與= ANY
WITH first_names AS (SELECT DISTINCT fname FROM voters)
SELECT name
from nicknames
WHERE groupi = (
SELECT nn.groupi
FROM nicknames AS nn
WHERE name = 'john'
) AND name != 'john' AND upper(name) = ANY(first_names);
錯誤: column "first_names" does not exist
如何使一個數組從選擇,並在那裏語句中使用它?