human
Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. 
###Database Schema: WEEK, Sydney, Melbourne, Brisbane, Adelaide, Perth, TOTAL, NIGHTLY RANK
###Question: What was the total rating on week 3? 
gpt
SELECT TOTAL FROM table WHERE WEEK = 3