In the following query I get syntax error:
SELECT <property1>, <property2>
FROM <table1>
ORDER BY <condition> LIMIT 1
UNION ALL
SELECT <property1>, <property2>
FROM <table2>
WHERE <condition> ORDER BY <condition> LIMIT 1;
syntax error at or near "UNION" LINE 4: UNION ALL
Each of the SELECT
stand alone executes fine. My guess is about the ORDER BY... LIMIT 1
maybe?