different fields in sql for messages