Corrected queries (db) to work with specific columns.