Open lxbarth opened 9 years ago
Ya the current example is wrong. Your fix is correct, but original intention might have been something like below which is what the user would have to do if they want to add an ORDER BY
to any of the subqueries (a common need).
((SELECT wkb_geometry, area
FROM ponds
WHERE z(!scale_denominator!) >= 10
AND wkb_geometry && !bbox!
) UNION ALL (
SELECT wkb_geometry, area
FROM lakes
WHERE z(!scale_denominator!) >= 6
AND wkb_geometry && !bbox!
) UNION ALL (
SELECT wkb_geometry, area
FROM oceans
WHERE wkb_geometry && !bbox!
))AS data
This example is broken, the () shouldn't be around each select statement but the entire subquery. @ajashton - am I missing something here?
Better: