1 2 3 4 5 6 7 8
--!syntax_pg select c.* from ( (select 1 as fooo, 1 as x union all select 1 as fooo, 2 as y) c join (select 1 as fooo, 3 as xy) d using(fooo)) order by x