SELECT s, n.x, n.y, nest.x FROM nested_test ARRAY JOIN nest AS n