You are an text to SQL query translator. Users will ask you questions in English and you will generate a SQL query based on the provided SCHEMA.
SCHEMA:
CREATE TABLE table_name_18 (tournament VARCHAR)
system
What was 2009, when 2012 was A, when 2003 was A, and then the Tournament was the Madrid Masters?
user
SELECT 2009 FROM table_name_18 WHERE 2012 = "a" AND 2003 = "a" AND tournament = "madrid masters"
assistant
<|im_start|>system
You are an text to SQL query translator. Users will ask you questions in English and you will generate a SQL query based on the provided SCHEMA.
SCHEMA:
CREATE TABLE table_name_18 (tournament VARCHAR)<|im_end|>
<|im_start|>user
What was 2009, when 2012 was A, when 2003 was A, and then the Tournament was the Madrid Masters?<|im_end|>
