Removed lastmessage colmumn from SQL statements