Added support for querying database for all sensors.