sert121/SpiderSQL huggingface dataset:
-- Language PostgreSQL
        -- Tables: 
             -- Table: ref hotel star ratings 
columns : [['star rating code', 'text'], ['star rating description', 'text']]

 -- Table: locations 
columns : [['location id', 'number'], ['location name', 'text'], ['address', 'text'], ['other details', 'text']]

 -- Table: ref attraction types 
columns : [['attraction type code', 'text'], ['attraction type description', 'text']]

 -- Table: visitors 
columns : [['tourist id', 'number'], ['tourist details', 'text']]

 -- Table: features 
columns : [['feature id', 'number'], ['feature details', 'text']]

 -- Table: hotels 
columns : [['hotel id', 'number'], ['star rating code', 'text'], ['pets allowed yn', 'text'], ['price range', 'number'], ['other hotel details', 'text']]

 -- Table: tourist attractions 
columns : [['tourist attraction id', 'number'], ['attraction type code', 'text'], ['location id', 'number'], ['how to get there', 'text'], ['name', 'text'], ['description', 'text'], ['opening hours', 'text'], ['other details', 'text']]

 -- Table: street markets 
columns : [['market id', 'number'], ['market details', 'text']]

 -- Table: shops 
columns : [['shop id', 'number'], ['shop details', 'text']]

 -- Table: museums 
columns : [['museum id', 'number'], ['museum details', 'text']]

 -- Table: royal family 
columns : [['royal family id', 'number'], ['royal family details', 'text']]

 -- Table: theme parks 
columns : [['theme park id', 'number'], ['theme park details', 'text']]

 -- Table: visits 
columns : [['visit id', 'number'], ['tourist attraction id', 'number'], ['tourist id', 'number'], ['visit date', 'time'], ['visit details', 'text']]

 -- Table: photos 
columns : [['photo id', 'number'], ['tourist attraction id', 'number'], ['name', 'text'], ['description', 'text'], ['filename', 'text'], ['other details', 'text']]

 -- Table: staff 
columns : [['staff id', 'number'], ['tourist attraction id', 'number'], ['name', 'text'], ['other details', 'text']]

 -- Table: tourist attraction features 
columns : [['tourist attraction id', 'number'], ['feature id', 'number']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: Show the names and ids of tourist attractions that are visited at most once.
SQL: SELECT T1.Name ,  T1.Tourist_Attraction_ID FROM Tourist_Attractions AS T1 JOIN VISITS AS T2 ON T1.Tourist_Attraction_ID  =  T2.Tourist_Attraction_ID GROUP BY T2.Tourist_Attraction_ID HAVING count(*)  <=  1
-- Language PostgreSQL
        -- Tables: 
             -- Table: ref hotel star ratings 
columns : [['star rating code', 'text'], ['star rating description', 'text']]

 -- Table: locations 
columns : [['location id', 'number'], ['location name', 'text'], ['address', 'text'], ['other details', 'text']]

 -- Table: ref attraction types 
columns : [['attraction type code', 'text'], ['attraction type description', 'text']]

 -- Table: visitors 
columns : [['tourist id', 'number'], ['tourist details', 'text']]

 -- Table: features 
columns : [['feature id', 'number'], ['feature details', 'text']]

 -- Table: hotels 
columns : [['hotel id', 'number'], ['star rating code', 'text'], ['pets allowed yn', 'text'], ['price range', 'number'], ['other hotel details', 'text']]

 -- Table: tourist attractions 
columns : [['tourist attraction id', 'number'], ['attraction type code', 'text'], ['location id', 'number'], ['how to get there', 'text'], ['name', 'text'], ['description', 'text'], ['opening hours', 'text'], ['other details', 'text']]

 -- Table: street markets 
columns : [['market id', 'number'], ['market details', 'text']]

 -- Table: shops 
columns : [['shop id', 'number'], ['shop details', 'text']]

 -- Table: museums 
columns : [['museum id', 'number'], ['museum details', 'text']]

 -- Table: royal family 
columns : [['royal family id', 'number'], ['royal family details', 'text']]

 -- Table: theme parks 
columns : [['theme park id', 'number'], ['theme park details', 'text']]

 -- Table: visits 
columns : [['visit id', 'number'], ['tourist attraction id', 'number'], ['tourist id', 'number'], ['visit date', 'time'], ['visit details', 'text']]

 -- Table: photos 
columns : [['photo id', 'number'], ['tourist attraction id', 'number'], ['name', 'text'], ['description', 'text'], ['filename', 'text'], ['other details', 'text']]

 -- Table: staff 
columns : [['staff id', 'number'], ['tourist attraction id', 'number'], ['name', 'text'], ['other details', 'text']]

 -- Table: tourist attraction features 
columns : [['tourist attraction id', 'number'], ['feature id', 'number']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: What are the names and ids of the tourist attractions that are visited at most once?
SQL: SELECT T1.Name ,  T1.Tourist_Attraction_ID FROM Tourist_Attractions AS T1 JOIN VISITS AS T2 ON T1.Tourist_Attraction_ID  =  T2.Tourist_Attraction_ID GROUP BY T2.Tourist_Attraction_ID HAVING count(*)  <=  1
-- Language PostgreSQL
        -- Tables: 
             -- Table: ref hotel star ratings 
columns : [['star rating code', 'text'], ['star rating description', 'text']]

 -- Table: locations 
columns : [['location id', 'number'], ['location name', 'text'], ['address', 'text'], ['other details', 'text']]

 -- Table: ref attraction types 
columns : [['attraction type code', 'text'], ['attraction type description', 'text']]

 -- Table: visitors 
columns : [['tourist id', 'number'], ['tourist details', 'text']]

 -- Table: features 
columns : [['feature id', 'number'], ['feature details', 'text']]

 -- Table: hotels 
columns : [['hotel id', 'number'], ['star rating code', 'text'], ['pets allowed yn', 'text'], ['price range', 'number'], ['other hotel details', 'text']]

 -- Table: tourist attractions 
columns : [['tourist attraction id', 'number'], ['attraction type code', 'text'], ['location id', 'number'], ['how to get there', 'text'], ['name', 'text'], ['description', 'text'], ['opening hours', 'text'], ['other details', 'text']]

 -- Table: street markets 
columns : [['market id', 'number'], ['market details', 'text']]

 -- Table: shops 
columns : [['shop id', 'number'], ['shop details', 'text']]

 -- Table: museums 
columns : [['museum id', 'number'], ['museum details', 'text']]

 -- Table: royal family 
columns : [['royal family id', 'number'], ['royal family details', 'text']]

 -- Table: theme parks 
columns : [['theme park id', 'number'], ['theme park details', 'text']]

 -- Table: visits 
columns : [['visit id', 'number'], ['tourist attraction id', 'number'], ['tourist id', 'number'], ['visit date', 'time'], ['visit details', 'text']]

 -- Table: photos 
columns : [['photo id', 'number'], ['tourist attraction id', 'number'], ['name', 'text'], ['description', 'text'], ['filename', 'text'], ['other details', 'text']]

 -- Table: staff 
columns : [['staff id', 'number'], ['tourist attraction id', 'number'], ['name', 'text'], ['other details', 'text']]

 -- Table: tourist attraction features 
columns : [['tourist attraction id', 'number'], ['feature id', 'number']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: What are the names of tourist attractions that can be reached by walk or is at address 660 Shea Crescent?
SQL: SELECT T2.Name FROM Locations AS T1 JOIN Tourist_Attractions AS T2 ON T1.Location_ID  =  T2.Location_ID WHERE T1.Address  =  "660 Shea Crescent" OR T2.How_to_Get_There  =  "walk"
-- Language PostgreSQL
        -- Tables: 
             -- Table: ref hotel star ratings 
columns : [['star rating code', 'text'], ['star rating description', 'text']]

 -- Table: locations 
columns : [['location id', 'number'], ['location name', 'text'], ['address', 'text'], ['other details', 'text']]

 -- Table: ref attraction types 
columns : [['attraction type code', 'text'], ['attraction type description', 'text']]

 -- Table: visitors 
columns : [['tourist id', 'number'], ['tourist details', 'text']]

 -- Table: features 
columns : [['feature id', 'number'], ['feature details', 'text']]

 -- Table: hotels 
columns : [['hotel id', 'number'], ['star rating code', 'text'], ['pets allowed yn', 'text'], ['price range', 'number'], ['other hotel details', 'text']]

 -- Table: tourist attractions 
columns : [['tourist attraction id', 'number'], ['attraction type code', 'text'], ['location id', 'number'], ['how to get there', 'text'], ['name', 'text'], ['description', 'text'], ['opening hours', 'text'], ['other details', 'text']]

 -- Table: street markets 
columns : [['market id', 'number'], ['market details', 'text']]

 -- Table: shops 
columns : [['shop id', 'number'], ['shop details', 'text']]

 -- Table: museums 
columns : [['museum id', 'number'], ['museum details', 'text']]

 -- Table: royal family 
columns : [['royal family id', 'number'], ['royal family details', 'text']]

 -- Table: theme parks 
columns : [['theme park id', 'number'], ['theme park details', 'text']]

 -- Table: visits 
columns : [['visit id', 'number'], ['tourist attraction id', 'number'], ['tourist id', 'number'], ['visit date', 'time'], ['visit details', 'text']]

 -- Table: photos 
columns : [['photo id', 'number'], ['tourist attraction id', 'number'], ['name', 'text'], ['description', 'text'], ['filename', 'text'], ['other details', 'text']]

 -- Table: staff 
columns : [['staff id', 'number'], ['tourist attraction id', 'number'], ['name', 'text'], ['other details', 'text']]

 -- Table: tourist attraction features 
columns : [['tourist attraction id', 'number'], ['feature id', 'number']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: Find the names of the tourist attractions that is either accessible by walk or at address 660 Shea Crescent.
SQL: SELECT T2.Name FROM Locations AS T1 JOIN Tourist_Attractions AS T2 ON T1.Location_ID  =  T2.Location_ID WHERE T1.Address  =  "660 Shea Crescent" OR T2.How_to_Get_There  =  "walk"
-- Language PostgreSQL
        -- Tables: 
             -- Table: ref hotel star ratings 
columns : [['star rating code', 'text'], ['star rating description', 'text']]

 -- Table: locations 
columns : [['location id', 'number'], ['location name', 'text'], ['address', 'text'], ['other details', 'text']]

 -- Table: ref attraction types 
columns : [['attraction type code', 'text'], ['attraction type description', 'text']]

 -- Table: visitors 
columns : [['tourist id', 'number'], ['tourist details', 'text']]

 -- Table: features 
columns : [['feature id', 'number'], ['feature details', 'text']]

 -- Table: hotels 
columns : [['hotel id', 'number'], ['star rating code', 'text'], ['pets allowed yn', 'text'], ['price range', 'number'], ['other hotel details', 'text']]

 -- Table: tourist attractions 
columns : [['tourist attraction id', 'number'], ['attraction type code', 'text'], ['location id', 'number'], ['how to get there', 'text'], ['name', 'text'], ['description', 'text'], ['opening hours', 'text'], ['other details', 'text']]

 -- Table: street markets 
columns : [['market id', 'number'], ['market details', 'text']]

 -- Table: shops 
columns : [['shop id', 'number'], ['shop details', 'text']]

 -- Table: museums 
columns : [['museum id', 'number'], ['museum details', 'text']]

 -- Table: royal family 
columns : [['royal family id', 'number'], ['royal family details', 'text']]

 -- Table: theme parks 
columns : [['theme park id', 'number'], ['theme park details', 'text']]

 -- Table: visits 
columns : [['visit id', 'number'], ['tourist attraction id', 'number'], ['tourist id', 'number'], ['visit date', 'time'], ['visit details', 'text']]

 -- Table: photos 
columns : [['photo id', 'number'], ['tourist attraction id', 'number'], ['name', 'text'], ['description', 'text'], ['filename', 'text'], ['other details', 'text']]

 -- Table: staff 
columns : [['staff id', 'number'], ['tourist attraction id', 'number'], ['name', 'text'], ['other details', 'text']]

 -- Table: tourist attraction features 
columns : [['tourist attraction id', 'number'], ['feature id', 'number']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: What are the names of the tourist attractions that have parking or shopping as their feature details?
SQL: SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN Tourist_Attraction_Features AS T2 ON T1.tourist_attraction_id  =  T2.tourist_attraction_id JOIN Features AS T3 ON T2.Feature_ID  =  T3.Feature_ID WHERE T3.feature_Details  =  'park' UNION SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN Tourist_Attraction_Features AS T2 ON T1.tourist_attraction_id  =  T2.tourist_attraction_id JOIN Features AS T3 ON T2.Feature_ID  =  T3.Feature_ID WHERE T3.feature_Details  =  'shopping'
-- Language PostgreSQL
        -- Tables: 
             -- Table: ref hotel star ratings 
columns : [['star rating code', 'text'], ['star rating description', 'text']]

 -- Table: locations 
columns : [['location id', 'number'], ['location name', 'text'], ['address', 'text'], ['other details', 'text']]

 -- Table: ref attraction types 
columns : [['attraction type code', 'text'], ['attraction type description', 'text']]

 -- Table: visitors 
columns : [['tourist id', 'number'], ['tourist details', 'text']]

 -- Table: features 
columns : [['feature id', 'number'], ['feature details', 'text']]

 -- Table: hotels 
columns : [['hotel id', 'number'], ['star rating code', 'text'], ['pets allowed yn', 'text'], ['price range', 'number'], ['other hotel details', 'text']]

 -- Table: tourist attractions 
columns : [['tourist attraction id', 'number'], ['attraction type code', 'text'], ['location id', 'number'], ['how to get there', 'text'], ['name', 'text'], ['description', 'text'], ['opening hours', 'text'], ['other details', 'text']]

 -- Table: street markets 
columns : [['market id', 'number'], ['market details', 'text']]

 -- Table: shops 
columns : [['shop id', 'number'], ['shop details', 'text']]

 -- Table: museums 
columns : [['museum id', 'number'], ['museum details', 'text']]

 -- Table: royal family 
columns : [['royal family id', 'number'], ['royal family details', 'text']]

 -- Table: theme parks 
columns : [['theme park id', 'number'], ['theme park details', 'text']]

 -- Table: visits 
columns : [['visit id', 'number'], ['tourist attraction id', 'number'], ['tourist id', 'number'], ['visit date', 'time'], ['visit details', 'text']]

 -- Table: photos 
columns : [['photo id', 'number'], ['tourist attraction id', 'number'], ['name', 'text'], ['description', 'text'], ['filename', 'text'], ['other details', 'text']]

 -- Table: staff 
columns : [['staff id', 'number'], ['tourist attraction id', 'number'], ['name', 'text'], ['other details', 'text']]

 -- Table: tourist attraction features 
columns : [['tourist attraction id', 'number'], ['feature id', 'number']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: Find the tourist attractions that have parking or shopping as their feature details. What are the names of the attractions?
SQL: SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN Tourist_Attraction_Features AS T2 ON T1.tourist_attraction_id  =  T2.tourist_attraction_id JOIN Features AS T3 ON T2.Feature_ID  =  T3.Feature_ID WHERE T3.feature_Details  =  'park' UNION SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN Tourist_Attraction_Features AS T2 ON T1.tourist_attraction_id  =  T2.tourist_attraction_id JOIN Features AS T3 ON T2.Feature_ID  =  T3.Feature_ID WHERE T3.feature_Details  =  'shopping'
-- Language PostgreSQL
        -- Tables: 
             -- Table: ref hotel star ratings 
columns : [['star rating code', 'text'], ['star rating description', 'text']]

 -- Table: locations 
columns : [['location id', 'number'], ['location name', 'text'], ['address', 'text'], ['other details', 'text']]

 -- Table: ref attraction types 
columns : [['attraction type code', 'text'], ['attraction type description', 'text']]

 -- Table: visitors 
columns : [['tourist id', 'number'], ['tourist details', 'text']]

 -- Table: features 
columns : [['feature id', 'number'], ['feature details', 'text']]

 -- Table: hotels 
columns : [['hotel id', 'number'], ['star rating code', 'text'], ['pets allowed yn', 'text'], ['price range', 'number'], ['other hotel details', 'text']]

 -- Table: tourist attractions 
columns : [['tourist attraction id', 'number'], ['attraction type code', 'text'], ['location id', 'number'], ['how to get there', 'text'], ['name', 'text'], ['description', 'text'], ['opening hours', 'text'], ['other details', 'text']]

 -- Table: street markets 
columns : [['market id', 'number'], ['market details', 'text']]

 -- Table: shops 
columns : [['shop id', 'number'], ['shop details', 'text']]

 -- Table: museums 
columns : [['museum id', 'number'], ['museum details', 'text']]

 -- Table: royal family 
columns : [['royal family id', 'number'], ['royal family details', 'text']]

 -- Table: theme parks 
columns : [['theme park id', 'number'], ['theme park details', 'text']]

 -- Table: visits 
columns : [['visit id', 'number'], ['tourist attraction id', 'number'], ['tourist id', 'number'], ['visit date', 'time'], ['visit details', 'text']]

 -- Table: photos 
columns : [['photo id', 'number'], ['tourist attraction id', 'number'], ['name', 'text'], ['description', 'text'], ['filename', 'text'], ['other details', 'text']]

 -- Table: staff 
columns : [['staff id', 'number'], ['tourist attraction id', 'number'], ['name', 'text'], ['other details', 'text']]

 -- Table: tourist attraction features 
columns : [['tourist attraction id', 'number'], ['feature id', 'number']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: What are the names of tourist attractions that can be reached by bus or is at address 254 Ottilie Junction?
SQL: SELECT T2.Name FROM Locations AS T1 JOIN Tourist_Attractions AS T2 ON T1.Location_ID  =  T2.Location_ID WHERE T1.Address  =  "254 Ottilie Junction" OR T2.How_to_Get_There  =  "bus"
-- Language PostgreSQL
        -- Tables: 
             -- Table: ref hotel star ratings 
columns : [['star rating code', 'text'], ['star rating description', 'text']]

 -- Table: locations 
columns : [['location id', 'number'], ['location name', 'text'], ['address', 'text'], ['other details', 'text']]

 -- Table: ref attraction types 
columns : [['attraction type code', 'text'], ['attraction type description', 'text']]

 -- Table: visitors 
columns : [['tourist id', 'number'], ['tourist details', 'text']]

 -- Table: features 
columns : [['feature id', 'number'], ['feature details', 'text']]

 -- Table: hotels 
columns : [['hotel id', 'number'], ['star rating code', 'text'], ['pets allowed yn', 'text'], ['price range', 'number'], ['other hotel details', 'text']]

 -- Table: tourist attractions 
columns : [['tourist attraction id', 'number'], ['attraction type code', 'text'], ['location id', 'number'], ['how to get there', 'text'], ['name', 'text'], ['description', 'text'], ['opening hours', 'text'], ['other details', 'text']]

 -- Table: street markets 
columns : [['market id', 'number'], ['market details', 'text']]

 -- Table: shops 
columns : [['shop id', 'number'], ['shop details', 'text']]

 -- Table: museums 
columns : [['museum id', 'number'], ['museum details', 'text']]

 -- Table: royal family 
columns : [['royal family id', 'number'], ['royal family details', 'text']]

 -- Table: theme parks 
columns : [['theme park id', 'number'], ['theme park details', 'text']]

 -- Table: visits 
columns : [['visit id', 'number'], ['tourist attraction id', 'number'], ['tourist id', 'number'], ['visit date', 'time'], ['visit details', 'text']]

 -- Table: photos 
columns : [['photo id', 'number'], ['tourist attraction id', 'number'], ['name', 'text'], ['description', 'text'], ['filename', 'text'], ['other details', 'text']]

 -- Table: staff 
columns : [['staff id', 'number'], ['tourist attraction id', 'number'], ['name', 'text'], ['other details', 'text']]

 -- Table: tourist attraction features 
columns : [['tourist attraction id', 'number'], ['feature id', 'number']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: Find the names of the tourist attractions that is either accessible by bus or at address 254 Ottilie Junction.
SQL: SELECT T2.Name FROM Locations AS T1 JOIN Tourist_Attractions AS T2 ON T1.Location_ID  =  T2.Location_ID WHERE T1.Address  =  "254 Ottilie Junction" OR T2.How_to_Get_There  =  "bus"
-- Language PostgreSQL
        -- Tables: 
             -- Table: ref hotel star ratings 
columns : [['star rating code', 'text'], ['star rating description', 'text']]

 -- Table: locations 
columns : [['location id', 'number'], ['location name', 'text'], ['address', 'text'], ['other details', 'text']]

 -- Table: ref attraction types 
columns : [['attraction type code', 'text'], ['attraction type description', 'text']]

 -- Table: visitors 
columns : [['tourist id', 'number'], ['tourist details', 'text']]

 -- Table: features 
columns : [['feature id', 'number'], ['feature details', 'text']]

 -- Table: hotels 
columns : [['hotel id', 'number'], ['star rating code', 'text'], ['pets allowed yn', 'text'], ['price range', 'number'], ['other hotel details', 'text']]

 -- Table: tourist attractions 
columns : [['tourist attraction id', 'number'], ['attraction type code', 'text'], ['location id', 'number'], ['how to get there', 'text'], ['name', 'text'], ['description', 'text'], ['opening hours', 'text'], ['other details', 'text']]

 -- Table: street markets 
columns : [['market id', 'number'], ['market details', 'text']]

 -- Table: shops 
columns : [['shop id', 'number'], ['shop details', 'text']]

 -- Table: museums 
columns : [['museum id', 'number'], ['museum details', 'text']]

 -- Table: royal family 
columns : [['royal family id', 'number'], ['royal family details', 'text']]

 -- Table: theme parks 
columns : [['theme park id', 'number'], ['theme park details', 'text']]

 -- Table: visits 
columns : [['visit id', 'number'], ['tourist attraction id', 'number'], ['tourist id', 'number'], ['visit date', 'time'], ['visit details', 'text']]

 -- Table: photos 
columns : [['photo id', 'number'], ['tourist attraction id', 'number'], ['name', 'text'], ['description', 'text'], ['filename', 'text'], ['other details', 'text']]

 -- Table: staff 
columns : [['staff id', 'number'], ['tourist attraction id', 'number'], ['name', 'text'], ['other details', 'text']]

 -- Table: tourist attraction features 
columns : [['tourist attraction id', 'number'], ['feature id', 'number']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: What are the names of the tourist attractions Vincent and Marcelle visit?
SQL: SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN VISITORS AS T2 JOIN VISITS AS T3 ON T1.Tourist_Attraction_ID  =  T3.Tourist_Attraction_ID AND T2.Tourist_ID  =  T3.Tourist_ID WHERE T2.Tourist_Details  =  "Vincent" INTERSECT SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN VISITORS AS T2 JOIN VISITS AS T3 ON T1.Tourist_Attraction_ID  =  T3.Tourist_Attraction_ID AND T2.Tourist_ID  =  T3.Tourist_ID WHERE T2.Tourist_Details  =  "Marcelle"
-- Language PostgreSQL
        -- Tables: 
             -- Table: ref hotel star ratings 
columns : [['star rating code', 'text'], ['star rating description', 'text']]

 -- Table: locations 
columns : [['location id', 'number'], ['location name', 'text'], ['address', 'text'], ['other details', 'text']]

 -- Table: ref attraction types 
columns : [['attraction type code', 'text'], ['attraction type description', 'text']]

 -- Table: visitors 
columns : [['tourist id', 'number'], ['tourist details', 'text']]

 -- Table: features 
columns : [['feature id', 'number'], ['feature details', 'text']]

 -- Table: hotels 
columns : [['hotel id', 'number'], ['star rating code', 'text'], ['pets allowed yn', 'text'], ['price range', 'number'], ['other hotel details', 'text']]

 -- Table: tourist attractions 
columns : [['tourist attraction id', 'number'], ['attraction type code', 'text'], ['location id', 'number'], ['how to get there', 'text'], ['name', 'text'], ['description', 'text'], ['opening hours', 'text'], ['other details', 'text']]

 -- Table: street markets 
columns : [['market id', 'number'], ['market details', 'text']]

 -- Table: shops 
columns : [['shop id', 'number'], ['shop details', 'text']]

 -- Table: museums 
columns : [['museum id', 'number'], ['museum details', 'text']]

 -- Table: royal family 
columns : [['royal family id', 'number'], ['royal family details', 'text']]

 -- Table: theme parks 
columns : [['theme park id', 'number'], ['theme park details', 'text']]

 -- Table: visits 
columns : [['visit id', 'number'], ['tourist attraction id', 'number'], ['tourist id', 'number'], ['visit date', 'time'], ['visit details', 'text']]

 -- Table: photos 
columns : [['photo id', 'number'], ['tourist attraction id', 'number'], ['name', 'text'], ['description', 'text'], ['filename', 'text'], ['other details', 'text']]

 -- Table: staff 
columns : [['staff id', 'number'], ['tourist attraction id', 'number'], ['name', 'text'], ['other details', 'text']]

 -- Table: tourist attraction features 
columns : [['tourist attraction id', 'number'], ['feature id', 'number']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: Which tourist attractions do the tourists Vincent and Marcelle visit? Tell me the names of the attractions.
SQL: SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN VISITORS AS T2 JOIN VISITS AS T3 ON T1.Tourist_Attraction_ID  =  T3.Tourist_Attraction_ID AND T2.Tourist_ID  =  T3.Tourist_ID WHERE T2.Tourist_Details  =  "Vincent" INTERSECT SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN VISITORS AS T2 JOIN VISITS AS T3 ON T1.Tourist_Attraction_ID  =  T3.Tourist_Attraction_ID AND T2.Tourist_ID  =  T3.Tourist_ID WHERE T2.Tourist_Details  =  "Marcelle"
-- Language PostgreSQL
        -- Tables: 
             -- Table: ref hotel star ratings 
columns : [['star rating code', 'text'], ['star rating description', 'text']]

 -- Table: locations 
columns : [['location id', 'number'], ['location name', 'text'], ['address', 'text'], ['other details', 'text']]

 -- Table: ref attraction types 
columns : [['attraction type code', 'text'], ['attraction type description', 'text']]

 -- Table: visitors 
columns : [['tourist id', 'number'], ['tourist details', 'text']]

 -- Table: features 
columns : [['feature id', 'number'], ['feature details', 'text']]

 -- Table: hotels 
columns : [['hotel id', 'number'], ['star rating code', 'text'], ['pets allowed yn', 'text'], ['price range', 'number'], ['other hotel details', 'text']]

 -- Table: tourist attractions 
columns : [['tourist attraction id', 'number'], ['attraction type code', 'text'], ['location id', 'number'], ['how to get there', 'text'], ['name', 'text'], ['description', 'text'], ['opening hours', 'text'], ['other details', 'text']]

 -- Table: street markets 
columns : [['market id', 'number'], ['market details', 'text']]

 -- Table: shops 
columns : [['shop id', 'number'], ['shop details', 'text']]

 -- Table: museums 
columns : [['museum id', 'number'], ['museum details', 'text']]

 -- Table: royal family 
columns : [['royal family id', 'number'], ['royal family details', 'text']]

 -- Table: theme parks 
columns : [['theme park id', 'number'], ['theme park details', 'text']]

 -- Table: visits 
columns : [['visit id', 'number'], ['tourist attraction id', 'number'], ['tourist id', 'number'], ['visit date', 'time'], ['visit details', 'text']]

 -- Table: photos 
columns : [['photo id', 'number'], ['tourist attraction id', 'number'], ['name', 'text'], ['description', 'text'], ['filename', 'text'], ['other details', 'text']]

 -- Table: staff 
columns : [['staff id', 'number'], ['tourist attraction id', 'number'], ['name', 'text'], ['other details', 'text']]

 -- Table: tourist attraction features 
columns : [['tourist attraction id', 'number'], ['feature id', 'number']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: What are the names of tourist attraction that Alison visited but Rosalind did not visit?
SQL: SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN VISITORS AS T2 JOIN VISITS AS T3 ON T1.Tourist_Attraction_ID  =  T3.Tourist_Attraction_ID AND T2.Tourist_ID  =  T3.Tourist_ID WHERE T2.Tourist_Details  =  "Alison" EXCEPT SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN VISITORS AS T2 JOIN VISITS AS T3 ON T1.Tourist_Attraction_ID  =  T3.Tourist_Attraction_ID AND T2.Tourist_ID  =  T3.Tourist_ID WHERE T2.Tourist_Details  =  "Rosalind"
-- Language PostgreSQL
        -- Tables: 
             -- Table: ref hotel star ratings 
columns : [['star rating code', 'text'], ['star rating description', 'text']]

 -- Table: locations 
columns : [['location id', 'number'], ['location name', 'text'], ['address', 'text'], ['other details', 'text']]

 -- Table: ref attraction types 
columns : [['attraction type code', 'text'], ['attraction type description', 'text']]

 -- Table: visitors 
columns : [['tourist id', 'number'], ['tourist details', 'text']]

 -- Table: features 
columns : [['feature id', 'number'], ['feature details', 'text']]

 -- Table: hotels 
columns : [['hotel id', 'number'], ['star rating code', 'text'], ['pets allowed yn', 'text'], ['price range', 'number'], ['other hotel details', 'text']]

 -- Table: tourist attractions 
columns : [['tourist attraction id', 'number'], ['attraction type code', 'text'], ['location id', 'number'], ['how to get there', 'text'], ['name', 'text'], ['description', 'text'], ['opening hours', 'text'], ['other details', 'text']]

 -- Table: street markets 
columns : [['market id', 'number'], ['market details', 'text']]

 -- Table: shops 
columns : [['shop id', 'number'], ['shop details', 'text']]

 -- Table: museums 
columns : [['museum id', 'number'], ['museum details', 'text']]

 -- Table: royal family 
columns : [['royal family id', 'number'], ['royal family details', 'text']]

 -- Table: theme parks 
columns : [['theme park id', 'number'], ['theme park details', 'text']]

 -- Table: visits 
columns : [['visit id', 'number'], ['tourist attraction id', 'number'], ['tourist id', 'number'], ['visit date', 'time'], ['visit details', 'text']]

 -- Table: photos 
columns : [['photo id', 'number'], ['tourist attraction id', 'number'], ['name', 'text'], ['description', 'text'], ['filename', 'text'], ['other details', 'text']]

 -- Table: staff 
columns : [['staff id', 'number'], ['tourist attraction id', 'number'], ['name', 'text'], ['other details', 'text']]

 -- Table: tourist attraction features 
columns : [['tourist attraction id', 'number'], ['feature id', 'number']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: Find the the names of the tourist attractions that the tourist named Alison visited but Rosalind did not visit.
SQL: SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN VISITORS AS T2 JOIN VISITS AS T3 ON T1.Tourist_Attraction_ID  =  T3.Tourist_Attraction_ID AND T2.Tourist_ID  =  T3.Tourist_ID WHERE T2.Tourist_Details  =  "Alison" EXCEPT SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN VISITORS AS T2 JOIN VISITS AS T3 ON T1.Tourist_Attraction_ID  =  T3.Tourist_Attraction_ID AND T2.Tourist_ID  =  T3.Tourist_ID WHERE T2.Tourist_Details  =  "Rosalind"
-- Language PostgreSQL
        -- Tables: 
             -- Table: ref hotel star ratings 
columns : [['star rating code', 'text'], ['star rating description', 'text']]

 -- Table: locations 
columns : [['location id', 'number'], ['location name', 'text'], ['address', 'text'], ['other details', 'text']]

 -- Table: ref attraction types 
columns : [['attraction type code', 'text'], ['attraction type description', 'text']]

 -- Table: visitors 
columns : [['tourist id', 'number'], ['tourist details', 'text']]

 -- Table: features 
columns : [['feature id', 'number'], ['feature details', 'text']]

 -- Table: hotels 
columns : [['hotel id', 'number'], ['star rating code', 'text'], ['pets allowed yn', 'text'], ['price range', 'number'], ['other hotel details', 'text']]

 -- Table: tourist attractions 
columns : [['tourist attraction id', 'number'], ['attraction type code', 'text'], ['location id', 'number'], ['how to get there', 'text'], ['name', 'text'], ['description', 'text'], ['opening hours', 'text'], ['other details', 'text']]

 -- Table: street markets 
columns : [['market id', 'number'], ['market details', 'text']]

 -- Table: shops 
columns : [['shop id', 'number'], ['shop details', 'text']]

 -- Table: museums 
columns : [['museum id', 'number'], ['museum details', 'text']]

 -- Table: royal family 
columns : [['royal family id', 'number'], ['royal family details', 'text']]

 -- Table: theme parks 
columns : [['theme park id', 'number'], ['theme park details', 'text']]

 -- Table: visits 
columns : [['visit id', 'number'], ['tourist attraction id', 'number'], ['tourist id', 'number'], ['visit date', 'time'], ['visit details', 'text']]

 -- Table: photos 
columns : [['photo id', 'number'], ['tourist attraction id', 'number'], ['name', 'text'], ['description', 'text'], ['filename', 'text'], ['other details', 'text']]

 -- Table: staff 
columns : [['staff id', 'number'], ['tourist attraction id', 'number'], ['name', 'text'], ['other details', 'text']]

 -- Table: tourist attraction features 
columns : [['tourist attraction id', 'number'], ['feature id', 'number']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: How many tourists did not make any visit?
SQL: SELECT count(*) FROM Visitors WHERE Tourist_ID NOT IN ( SELECT Tourist_ID FROM Visits )
-- Language PostgreSQL
        -- Tables: 
             -- Table: ref hotel star ratings 
columns : [['star rating code', 'text'], ['star rating description', 'text']]

 -- Table: locations 
columns : [['location id', 'number'], ['location name', 'text'], ['address', 'text'], ['other details', 'text']]

 -- Table: ref attraction types 
columns : [['attraction type code', 'text'], ['attraction type description', 'text']]

 -- Table: visitors 
columns : [['tourist id', 'number'], ['tourist details', 'text']]

 -- Table: features 
columns : [['feature id', 'number'], ['feature details', 'text']]

 -- Table: hotels 
columns : [['hotel id', 'number'], ['star rating code', 'text'], ['pets allowed yn', 'text'], ['price range', 'number'], ['other hotel details', 'text']]

 -- Table: tourist attractions 
columns : [['tourist attraction id', 'number'], ['attraction type code', 'text'], ['location id', 'number'], ['how to get there', 'text'], ['name', 'text'], ['description', 'text'], ['opening hours', 'text'], ['other details', 'text']]

 -- Table: street markets 
columns : [['market id', 'number'], ['market details', 'text']]

 -- Table: shops 
columns : [['shop id', 'number'], ['shop details', 'text']]

 -- Table: museums 
columns : [['museum id', 'number'], ['museum details', 'text']]

 -- Table: royal family 
columns : [['royal family id', 'number'], ['royal family details', 'text']]

 -- Table: theme parks 
columns : [['theme park id', 'number'], ['theme park details', 'text']]

 -- Table: visits 
columns : [['visit id', 'number'], ['tourist attraction id', 'number'], ['tourist id', 'number'], ['visit date', 'time'], ['visit details', 'text']]

 -- Table: photos 
columns : [['photo id', 'number'], ['tourist attraction id', 'number'], ['name', 'text'], ['description', 'text'], ['filename', 'text'], ['other details', 'text']]

 -- Table: staff 
columns : [['staff id', 'number'], ['tourist attraction id', 'number'], ['name', 'text'], ['other details', 'text']]

 -- Table: tourist attraction features 
columns : [['tourist attraction id', 'number'], ['feature id', 'number']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: Count the number of tourists who did not visit any place.
SQL: SELECT count(*) FROM Visitors WHERE Tourist_ID NOT IN ( SELECT Tourist_ID FROM Visits )
-- Language PostgreSQL
        -- Tables: 
             -- Table: student 
columns : [['student id', 'number'], ['last name', 'text'], ['first name', 'text'], ['age', 'number'], ['sex', 'text'], ['major', 'number'], ['advisor', 'number'], ['city code', 'text']]

 -- Table: video games 
columns : [['game id', 'number'], ['game name', 'text'], ['game type', 'text']]

 -- Table: plays games 
columns : [['student id', 'number'], ['game id', 'number'], ['hours played', 'number']]

 -- Table: sports info 
columns : [['student id', 'number'], ['sport name', 'text'], ['hours per week', 'number'], ['games played', 'number'], ['on scholarship', 'text']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: How many video games exist?
SQL: SELECT count(*) FROM Video_games
-- Language PostgreSQL
        -- Tables: 
             -- Table: student 
columns : [['student id', 'number'], ['last name', 'text'], ['first name', 'text'], ['age', 'number'], ['sex', 'text'], ['major', 'number'], ['advisor', 'number'], ['city code', 'text']]

 -- Table: video games 
columns : [['game id', 'number'], ['game name', 'text'], ['game type', 'text']]

 -- Table: plays games 
columns : [['student id', 'number'], ['game id', 'number'], ['hours played', 'number']]

 -- Table: sports info 
columns : [['student id', 'number'], ['sport name', 'text'], ['hours per week', 'number'], ['games played', 'number'], ['on scholarship', 'text']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: How many video games do you have?
SQL: SELECT count(*) FROM Video_games
-- Language PostgreSQL
        -- Tables: 
             -- Table: student 
columns : [['student id', 'number'], ['last name', 'text'], ['first name', 'text'], ['age', 'number'], ['sex', 'text'], ['major', 'number'], ['advisor', 'number'], ['city code', 'text']]

 -- Table: video games 
columns : [['game id', 'number'], ['game name', 'text'], ['game type', 'text']]

 -- Table: plays games 
columns : [['student id', 'number'], ['game id', 'number'], ['hours played', 'number']]

 -- Table: sports info 
columns : [['student id', 'number'], ['sport name', 'text'], ['hours per week', 'number'], ['games played', 'number'], ['on scholarship', 'text']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: How many video game types exist?
SQL: SELECT count(DISTINCT gtype) FROM Video_games
-- Language PostgreSQL
        -- Tables: 
             -- Table: student 
columns : [['student id', 'number'], ['last name', 'text'], ['first name', 'text'], ['age', 'number'], ['sex', 'text'], ['major', 'number'], ['advisor', 'number'], ['city code', 'text']]

 -- Table: video games 
columns : [['game id', 'number'], ['game name', 'text'], ['game type', 'text']]

 -- Table: plays games 
columns : [['student id', 'number'], ['game id', 'number'], ['hours played', 'number']]

 -- Table: sports info 
columns : [['student id', 'number'], ['sport name', 'text'], ['hours per week', 'number'], ['games played', 'number'], ['on scholarship', 'text']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: What is the count of different game types?
SQL: SELECT count(DISTINCT gtype) FROM Video_games
-- Language PostgreSQL
        -- Tables: 
             -- Table: student 
columns : [['student id', 'number'], ['last name', 'text'], ['first name', 'text'], ['age', 'number'], ['sex', 'text'], ['major', 'number'], ['advisor', 'number'], ['city code', 'text']]

 -- Table: video games 
columns : [['game id', 'number'], ['game name', 'text'], ['game type', 'text']]

 -- Table: plays games 
columns : [['student id', 'number'], ['game id', 'number'], ['hours played', 'number']]

 -- Table: sports info 
columns : [['student id', 'number'], ['sport name', 'text'], ['hours per week', 'number'], ['games played', 'number'], ['on scholarship', 'text']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: Show all video game types.
SQL: SELECT DISTINCT gtype FROM Video_games
-- Language PostgreSQL
        -- Tables: 
             -- Table: student 
columns : [['student id', 'number'], ['last name', 'text'], ['first name', 'text'], ['age', 'number'], ['sex', 'text'], ['major', 'number'], ['advisor', 'number'], ['city code', 'text']]

 -- Table: video games 
columns : [['game id', 'number'], ['game name', 'text'], ['game type', 'text']]

 -- Table: plays games 
columns : [['student id', 'number'], ['game id', 'number'], ['hours played', 'number']]

 -- Table: sports info 
columns : [['student id', 'number'], ['sport name', 'text'], ['hours per week', 'number'], ['games played', 'number'], ['on scholarship', 'text']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: What are the different types of video games?
SQL: SELECT DISTINCT gtype FROM Video_games
-- Language PostgreSQL
        -- Tables: 
             -- Table: student 
columns : [['student id', 'number'], ['last name', 'text'], ['first name', 'text'], ['age', 'number'], ['sex', 'text'], ['major', 'number'], ['advisor', 'number'], ['city code', 'text']]

 -- Table: video games 
columns : [['game id', 'number'], ['game name', 'text'], ['game type', 'text']]

 -- Table: plays games 
columns : [['student id', 'number'], ['game id', 'number'], ['hours played', 'number']]

 -- Table: sports info 
columns : [['student id', 'number'], ['sport name', 'text'], ['hours per week', 'number'], ['games played', 'number'], ['on scholarship', 'text']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: Show all video games and their types in the order of their names.
SQL: SELECT gname ,  gtype FROM Video_games ORDER BY gname
-- Language PostgreSQL
        -- Tables: 
             -- Table: student 
columns : [['student id', 'number'], ['last name', 'text'], ['first name', 'text'], ['age', 'number'], ['sex', 'text'], ['major', 'number'], ['advisor', 'number'], ['city code', 'text']]

 -- Table: video games 
columns : [['game id', 'number'], ['game name', 'text'], ['game type', 'text']]

 -- Table: plays games 
columns : [['student id', 'number'], ['game id', 'number'], ['hours played', 'number']]

 -- Table: sports info 
columns : [['student id', 'number'], ['sport name', 'text'], ['hours per week', 'number'], ['games played', 'number'], ['on scholarship', 'text']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: What are the names of all the video games and their types in alphabetical order?
SQL: SELECT gname ,  gtype FROM Video_games ORDER BY gname