alter sql queries and chats repo