Changes student page SQL query to be pretty