Beautified two SQL queries

2 jobs for feature/beautification_sql in 2 minutes and 44 seconds