Formatting on sample SQL query