I have 2 tables: Hours, that contains one field and has records for every hour (9:00, 10:00, 11:00, ...). The second table, table2, is as follows: ID, date hour, 1, 2, 3, 4, 5.
I have a query that looks like this: select table2.*, hours.hour from hours left join on hours.hour = table2.hour...