Correct errors in conversation SQL queries