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: What are the names and descriptions of the photos taken at the tourist attraction "film festival"?
SQL: SELECT T1.Name ,  T1.Description FROM PHOTOS AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Tourist_Attraction_ID  =  T2.Tourist_Attraction_ID WHERE T2.Name  =  "film festival"
-- 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 and descriptions of the photos taken at the tourist attraction called "film festival".
SQL: SELECT T1.Name ,  T1.Description FROM PHOTOS AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Tourist_Attraction_ID  =  T2.Tourist_Attraction_ID WHERE T2.Name  =  "film festival"
-- 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 details and ways to get to tourist attractions related to royal family?
SQL: SELECT T1.Royal_Family_Details ,  T2.How_to_Get_There FROM ROYAL_FAMILY AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Royal_Family_ID  =  T2.Tourist_Attraction_ID
-- 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 are related to royal family? Tell me their details and how we can get there.
SQL: SELECT T1.Royal_Family_Details ,  T2.How_to_Get_There FROM ROYAL_FAMILY AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Royal_Family_ID  =  T2.Tourist_Attraction_ID
-- 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 details of the shops that can be accessed by walk?
SQL: SELECT T1.Shop_Details FROM SHOPS AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Shop_ID  =  T2.Tourist_Attraction_ID WHERE 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 details of the shops that can be reached by walk.
SQL: SELECT T1.Shop_Details FROM SHOPS AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Shop_ID  =  T2.Tourist_Attraction_ID WHERE 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 is the name of the staff that is in charge of the attraction named "US museum"?
SQL: SELECT T1.Name FROM STAFF AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Tourist_Attraction_ID  =  T2.Tourist_Attraction_ID WHERE T2.Name  =  "US museum"
-- 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: Tell me the name of the staff in charge of the attraction called "US museum".
SQL: SELECT T1.Name FROM STAFF AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Tourist_Attraction_ID  =  T2.Tourist_Attraction_ID WHERE T2.Name  =  "US museum"
-- 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 details of the markets that can be accessed by walk or bus?
SQL: SELECT T1.Market_Details FROM Street_Markets AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Market_ID  =  T2.Tourist_Attraction_ID WHERE T2.How_to_Get_There  =  "walk" 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 details of all the markets that are accessible by walk or bus.
SQL: SELECT T1.Market_Details FROM Street_Markets AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Market_ID  =  T2.Tourist_Attraction_ID WHERE T2.How_to_Get_There  =  "walk" 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 visit date and details of the visitor whose detail is 'Vincent'?
SQL: SELECT T2.Visit_Date ,  T2.Visit_Details FROM VISITORS AS T1 JOIN VISITS AS T2 ON T1.Tourist_ID  =  T2.Tourist_ID WHERE T1.Tourist_Details  =  "Vincent"
-- 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 visit date and details of the tourist whose detail is 'Vincent'
SQL: SELECT T2.Visit_Date ,  T2.Visit_Details FROM VISITORS AS T1 JOIN VISITS AS T2 ON T1.Tourist_ID  =  T2.Tourist_ID WHERE T1.Tourist_Details  =  "Vincent"
-- 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 does the visitor with detail 'Vincent' visit?
SQL: SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN VISITS AS T2 ON T1.Tourist_Attraction_ID  =  T2.Tourist_Attraction_ID JOIN VISITORS AS T3 ON T2.Tourist_ID  =  T3.Tourist_ID WHERE T3.Tourist_Details  =  "Vincent"
-- 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 tourist attractions visited by the tourist whose detail is 'Vincent'.
SQL: SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN VISITS AS T2 ON T1.Tourist_Attraction_ID  =  T2.Tourist_Attraction_ID JOIN VISITORS AS T3 ON T2.Tourist_ID  =  T3.Tourist_ID WHERE T3.Tourist_Details  =  "Vincent"
-- 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 and the dates when the tourists named Vincent or Vivian visited there?
SQL: SELECT T1.Name ,  T3.Visit_Date 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" OR T2.Tourist_Details  =  "Vivian"
-- 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: For each tourist attraction, return its name and the date when the tourists named Vincent or Vivian visited there.
SQL: SELECT T1.Name ,  T3.Visit_Date 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" OR T2.Tourist_Details  =  "Vivian"
-- 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 average price of hotels for each star rating code.
SQL: SELECT star_rating_code ,  avg(price_range) FROM HOTELS GROUP BY star_rating_code
-- 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 is the average price range of hotels for each each star rating code?
SQL: SELECT star_rating_code ,  avg(price_range) FROM HOTELS GROUP BY star_rating_code