U kunt alle tabellen doorlopen om een enkele query dynamisch als volgt te maken:
SELECT device_name, sensor_value FROM device_table WHERE sensor_value > 10
UNION
SELECT device_name, sensor_value FROM device_table2 WHERE sensor_value > 10
UNION
SELECT device_name, sensor_value FROM device_table3 WHERE sensor_value > 10;