Fixed sql query column numbering
Added timestamps