SELECT location FROM sensor_instances LEFT JOIN sensor_alerts ON sensor_instances.id = sensor_alerts.sensorid
SELECT sensor_alerts.*, sensor_instances.location
FROM sensor_instances
LEFT JOIN sensor_alerts ON sensor_instances.id = sensor_alerts.sensorid
первые 20 строкLIMIT and OFFSET или FETCH.