Rearranged layout on queries.sql