1sf/bird-sql-train-with-schema huggingface dataset:
Database: address
Tables: CBSA, state, congress, zip_data, alias, area_code, avoid, country, zip_congress
Columns (table index, column name): -1, *, 0, CBSA, 0, CBSA_name, 0, CBSA_type, 1, abbreviation, 1, name, 2, cognress_rep_id, 2, first_name, 2, last_name, 2, CID, 2, party, 2, state, 2, abbreviation, 2, House, 2, District, 2, land_area, 3, zip_code, 3, city, 3, state, 3, multi_county, 3, type, 3, organization, 3, time_zone, 3, daylight_savings, 3, latitude, 3, longitude, 3, elevation, 3, state_fips, 3, county_fips, 3, region, 3, division, 3, population_2020, 3, population_2010, 3, households, 3, avg_house_value, 3, avg_income_per_household, 3, persons_per_household, 3, white_population, 3, black_population, 3, hispanic_population, 3, asian_population, 3, american_indian_population, 3, hawaiian_population, 3, other_population, 3, male_population, 3, female_population, 3, median_age, 3, male_median_age, 3, female_median_age, 3, residential_mailboxes, 3, business_mailboxes, 3, total_delivery_receptacles, 3, businesses, 3, 1st_quarter_payroll, 3, annual_payroll, 3, employees, 3, water_area, 3, land_area, 3, single_family_delivery_units, 3, multi_family_delivery_units, 3, total_beneficiaries, 3, retired_workers, 3, disabled_workers, 3, parents_and_widowed, 3, spouses, 3, children, 3, over_65, 3, monthly_benefits_all, 3, monthly_benefits_retired_workers, 3, monthly_benefits_widowed, 3, CBSA, 4, zip_code, 4, alias, 5, zip_code, 5, area_code, 6, zip_code, 6, bad_alias, 7, zip_code, 7, county, 7, state, 8, zip_code, 8, district
Question: Provide the names of bad aliases in the city of Aguadilla.
SQL: SELECT T1.bad_alias FROM avoid AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T2.city = 'Aguadilla'
Database: address
Tables: CBSA, state, congress, zip_data, alias, area_code, avoid, country, zip_congress
Columns (table index, column name): -1, *, 0, CBSA, 0, CBSA_name, 0, CBSA_type, 1, abbreviation, 1, name, 2, cognress_rep_id, 2, first_name, 2, last_name, 2, CID, 2, party, 2, state, 2, abbreviation, 2, House, 2, District, 2, land_area, 3, zip_code, 3, city, 3, state, 3, multi_county, 3, type, 3, organization, 3, time_zone, 3, daylight_savings, 3, latitude, 3, longitude, 3, elevation, 3, state_fips, 3, county_fips, 3, region, 3, division, 3, population_2020, 3, population_2010, 3, households, 3, avg_house_value, 3, avg_income_per_household, 3, persons_per_household, 3, white_population, 3, black_population, 3, hispanic_population, 3, asian_population, 3, american_indian_population, 3, hawaiian_population, 3, other_population, 3, male_population, 3, female_population, 3, median_age, 3, male_median_age, 3, female_median_age, 3, residential_mailboxes, 3, business_mailboxes, 3, total_delivery_receptacles, 3, businesses, 3, 1st_quarter_payroll, 3, annual_payroll, 3, employees, 3, water_area, 3, land_area, 3, single_family_delivery_units, 3, multi_family_delivery_units, 3, total_beneficiaries, 3, retired_workers, 3, disabled_workers, 3, parents_and_widowed, 3, spouses, 3, children, 3, over_65, 3, monthly_benefits_all, 3, monthly_benefits_retired_workers, 3, monthly_benefits_widowed, 3, CBSA, 4, zip_code, 4, alias, 5, zip_code, 5, area_code, 6, zip_code, 6, bad_alias, 7, zip_code, 7, county, 7, state, 8, zip_code, 8, district
Question: Indicate the name of the congressman represent in Guanica.
Evidence: name of congressman implies full name which refers to first_name, last_name; Guanica is the city;
SQL: SELECT T3.first_name, T3.last_name FROM zip_data AS T1 INNER JOIN zip_congress AS T2 ON T1.zip_code = T2.zip_code INNER JOIN congress AS T3 ON T2.district = T3.cognress_rep_id WHERE T1.city = 'Guanica'
Database: address
Tables: CBSA, state, congress, zip_data, alias, area_code, avoid, country, zip_congress
Columns (table index, column name): -1, *, 0, CBSA, 0, CBSA_name, 0, CBSA_type, 1, abbreviation, 1, name, 2, cognress_rep_id, 2, first_name, 2, last_name, 2, CID, 2, party, 2, state, 2, abbreviation, 2, House, 2, District, 2, land_area, 3, zip_code, 3, city, 3, state, 3, multi_county, 3, type, 3, organization, 3, time_zone, 3, daylight_savings, 3, latitude, 3, longitude, 3, elevation, 3, state_fips, 3, county_fips, 3, region, 3, division, 3, population_2020, 3, population_2010, 3, households, 3, avg_house_value, 3, avg_income_per_household, 3, persons_per_household, 3, white_population, 3, black_population, 3, hispanic_population, 3, asian_population, 3, american_indian_population, 3, hawaiian_population, 3, other_population, 3, male_population, 3, female_population, 3, median_age, 3, male_median_age, 3, female_median_age, 3, residential_mailboxes, 3, business_mailboxes, 3, total_delivery_receptacles, 3, businesses, 3, 1st_quarter_payroll, 3, annual_payroll, 3, employees, 3, water_area, 3, land_area, 3, single_family_delivery_units, 3, multi_family_delivery_units, 3, total_beneficiaries, 3, retired_workers, 3, disabled_workers, 3, parents_and_widowed, 3, spouses, 3, children, 3, over_65, 3, monthly_benefits_all, 3, monthly_benefits_retired_workers, 3, monthly_benefits_widowed, 3, CBSA, 4, zip_code, 4, alias, 5, zip_code, 5, area_code, 6, zip_code, 6, bad_alias, 7, zip_code, 7, county, 7, state, 8, zip_code, 8, district
Question: Which state has the most bad aliases?
Evidence: the most bad aliases refer to MAX(COUNT(bad_alias));
SQL: SELECT T2.state FROM avoid AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code GROUP BY T2.state ORDER BY COUNT(T1.bad_alias) DESC LIMIT 1
Database: address
Tables: CBSA, state, congress, zip_data, alias, area_code, avoid, country, zip_congress
Columns (table index, column name): -1, *, 0, CBSA, 0, CBSA_name, 0, CBSA_type, 1, abbreviation, 1, name, 2, cognress_rep_id, 2, first_name, 2, last_name, 2, CID, 2, party, 2, state, 2, abbreviation, 2, House, 2, District, 2, land_area, 3, zip_code, 3, city, 3, state, 3, multi_county, 3, type, 3, organization, 3, time_zone, 3, daylight_savings, 3, latitude, 3, longitude, 3, elevation, 3, state_fips, 3, county_fips, 3, region, 3, division, 3, population_2020, 3, population_2010, 3, households, 3, avg_house_value, 3, avg_income_per_household, 3, persons_per_household, 3, white_population, 3, black_population, 3, hispanic_population, 3, asian_population, 3, american_indian_population, 3, hawaiian_population, 3, other_population, 3, male_population, 3, female_population, 3, median_age, 3, male_median_age, 3, female_median_age, 3, residential_mailboxes, 3, business_mailboxes, 3, total_delivery_receptacles, 3, businesses, 3, 1st_quarter_payroll, 3, annual_payroll, 3, employees, 3, water_area, 3, land_area, 3, single_family_delivery_units, 3, multi_family_delivery_units, 3, total_beneficiaries, 3, retired_workers, 3, disabled_workers, 3, parents_and_widowed, 3, spouses, 3, children, 3, over_65, 3, monthly_benefits_all, 3, monthly_benefits_retired_workers, 3, monthly_benefits_widowed, 3, CBSA, 4, zip_code, 4, alias, 5, zip_code, 5, area_code, 6, zip_code, 6, bad_alias, 7, zip_code, 7, county, 7, state, 8, zip_code, 8, district
Question: What is the difference in the number of bad alias between Aguada city and Aguadilla city?
Evidence: SUBTRACT(COUNT(bad_alias where city = 'Aguada'), COUNT(bad_alias where city = 'Aguadilla'));
SQL: SELECT COUNT(CASE WHEN T2.city = 'Aguada' THEN T1.bad_alias ELSE NULL END) - COUNT(CASE WHEN T2.city = 'Aguadilla' THEN T1.bad_alias ELSE NULL END) AS DIFFERENCE FROM avoid AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code
Database: address
Tables: CBSA, state, congress, zip_data, alias, area_code, avoid, country, zip_congress
Columns (table index, column name): -1, *, 0, CBSA, 0, CBSA_name, 0, CBSA_type, 1, abbreviation, 1, name, 2, cognress_rep_id, 2, first_name, 2, last_name, 2, CID, 2, party, 2, state, 2, abbreviation, 2, House, 2, District, 2, land_area, 3, zip_code, 3, city, 3, state, 3, multi_county, 3, type, 3, organization, 3, time_zone, 3, daylight_savings, 3, latitude, 3, longitude, 3, elevation, 3, state_fips, 3, county_fips, 3, region, 3, division, 3, population_2020, 3, population_2010, 3, households, 3, avg_house_value, 3, avg_income_per_household, 3, persons_per_household, 3, white_population, 3, black_population, 3, hispanic_population, 3, asian_population, 3, american_indian_population, 3, hawaiian_population, 3, other_population, 3, male_population, 3, female_population, 3, median_age, 3, male_median_age, 3, female_median_age, 3, residential_mailboxes, 3, business_mailboxes, 3, total_delivery_receptacles, 3, businesses, 3, 1st_quarter_payroll, 3, annual_payroll, 3, employees, 3, water_area, 3, land_area, 3, single_family_delivery_units, 3, multi_family_delivery_units, 3, total_beneficiaries, 3, retired_workers, 3, disabled_workers, 3, parents_and_widowed, 3, spouses, 3, children, 3, over_65, 3, monthly_benefits_all, 3, monthly_benefits_retired_workers, 3, monthly_benefits_widowed, 3, CBSA, 4, zip_code, 4, alias, 5, zip_code, 5, area_code, 6, zip_code, 6, bad_alias, 7, zip_code, 7, county, 7, state, 8, zip_code, 8, district
Question: Which state has greater than 50 CBSA officers of metro type?
Evidence: greater than 50 CBSA officers of metro type refers to COUNT(CBSA_type = 'Metro') > 50;
SQL: SELECT T2.state FROM CBSA AS T1 INNER JOIN zip_data AS T2 ON T1.CBSA = T2.CBSA WHERE T1.CBSA_type = 'Metro' GROUP BY T2.state HAVING COUNT(T1.CBSA_type) > 50
Database: address
Tables: CBSA, state, congress, zip_data, alias, area_code, avoid, country, zip_congress
Columns (table index, column name): -1, *, 0, CBSA, 0, CBSA_name, 0, CBSA_type, 1, abbreviation, 1, name, 2, cognress_rep_id, 2, first_name, 2, last_name, 2, CID, 2, party, 2, state, 2, abbreviation, 2, House, 2, District, 2, land_area, 3, zip_code, 3, city, 3, state, 3, multi_county, 3, type, 3, organization, 3, time_zone, 3, daylight_savings, 3, latitude, 3, longitude, 3, elevation, 3, state_fips, 3, county_fips, 3, region, 3, division, 3, population_2020, 3, population_2010, 3, households, 3, avg_house_value, 3, avg_income_per_household, 3, persons_per_household, 3, white_population, 3, black_population, 3, hispanic_population, 3, asian_population, 3, american_indian_population, 3, hawaiian_population, 3, other_population, 3, male_population, 3, female_population, 3, median_age, 3, male_median_age, 3, female_median_age, 3, residential_mailboxes, 3, business_mailboxes, 3, total_delivery_receptacles, 3, businesses, 3, 1st_quarter_payroll, 3, annual_payroll, 3, employees, 3, water_area, 3, land_area, 3, single_family_delivery_units, 3, multi_family_delivery_units, 3, total_beneficiaries, 3, retired_workers, 3, disabled_workers, 3, parents_and_widowed, 3, spouses, 3, children, 3, over_65, 3, monthly_benefits_all, 3, monthly_benefits_retired_workers, 3, monthly_benefits_widowed, 3, CBSA, 4, zip_code, 4, alias, 5, zip_code, 5, area_code, 6, zip_code, 6, bad_alias, 7, zip_code, 7, county, 7, state, 8, zip_code, 8, district
Question: Provide the population of Arecibo in 2020.
Evidence: population of Arecibo in 2020 refers to SUM(population_2020) where county = 'ARECIBO';
SQL: SELECT SUM(T2.population_2020) FROM country AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T1.county = 'ARECIBO'
Database: beer_factory
Tables: customers, geolocation, location, rootbeerbrand, rootbeer, rootbeerreview, transaction
Columns (table index, column name): -1, *, 0, CustomerID, 0, First, 0, Last, 0, StreetAddress, 0, City, 0, State, 0, ZipCode, 0, Email, 0, PhoneNumber, 0, FirstPurchaseDate, 0, SubscribedToEmailList, 0, Gender, 1, LocationID, 1, Latitude, 1, Longitude, 2, LocationID, 2, LocationName, 2, StreetAddress, 2, City, 2, State, 2, ZipCode, 3, BrandID, 3, BrandName, 3, FirstBrewedYear, 3, BreweryName, 3, City, 3, State, 3, Country, 3, Description, 3, CaneSugar, 3, CornSyrup, 3, Honey, 3, ArtificialSweetener, 3, Caffeinated, 3, Alcoholic, 3, AvailableInCans, 3, AvailableInBottles, 3, AvailableInKegs, 3, Website, 3, FacebookPage, 3, Twitter, 3, WholesaleCost, 3, CurrentRetailPrice, 4, RootBeerID, 4, BrandID, 4, ContainerType, 4, LocationID, 4, PurchaseDate, 5, CustomerID, 5, BrandID, 5, StarRating, 5, ReviewDate, 5, Review, 6, TransactionID, 6, CreditCardNumber, 6, CustomerID, 6, TransactionDate, 6, CreditCardType, 6, LocationID, 6, RootBeerID, 6, PurchasePrice
Question: What is the average number of root beers of the brand A&W sold in a day in August, 2014?
Evidence: average = DIVIDE(SUM(COUNT(RootBeerID WHERE BrandName = 'A&W' AND SUBSTR(TransactionDate, 1, 4) = '2014' AND SUBSTR(TransactionDate, 6, 2) = '08')), 31); A&W refers to BrandName = 'A&W'; in August, 2014 refers to SUBSTR(TransactionDate, 1, 4) = '2014' AND SUBSTR(TransactionDate, 6, 2) = '08';
SQL: SELECT CAST(COUNT(T1.BrandID) AS REAL) / 31 FROM rootbeer AS T1 INNER JOIN `transaction` AS T2 ON T1.RootBeerID = T2.RootBeerID INNER JOIN rootbeerbrand AS T3 ON T1.BrandID = T3.BrandID WHERE T2.TransactionDate LIKE '2014-08%' AND T3.BrandName = 'A&W'
Database: beer_factory
Tables: customers, geolocation, location, rootbeerbrand, rootbeer, rootbeerreview, transaction
Columns (table index, column name): -1, *, 0, CustomerID, 0, First, 0, Last, 0, StreetAddress, 0, City, 0, State, 0, ZipCode, 0, Email, 0, PhoneNumber, 0, FirstPurchaseDate, 0, SubscribedToEmailList, 0, Gender, 1, LocationID, 1, Latitude, 1, Longitude, 2, LocationID, 2, LocationName, 2, StreetAddress, 2, City, 2, State, 2, ZipCode, 3, BrandID, 3, BrandName, 3, FirstBrewedYear, 3, BreweryName, 3, City, 3, State, 3, Country, 3, Description, 3, CaneSugar, 3, CornSyrup, 3, Honey, 3, ArtificialSweetener, 3, Caffeinated, 3, Alcoholic, 3, AvailableInCans, 3, AvailableInBottles, 3, AvailableInKegs, 3, Website, 3, FacebookPage, 3, Twitter, 3, WholesaleCost, 3, CurrentRetailPrice, 4, RootBeerID, 4, BrandID, 4, ContainerType, 4, LocationID, 4, PurchaseDate, 5, CustomerID, 5, BrandID, 5, StarRating, 5, ReviewDate, 5, Review, 6, TransactionID, 6, CreditCardNumber, 6, CustomerID, 6, TransactionDate, 6, CreditCardType, 6, LocationID, 6, RootBeerID, 6, PurchasePrice
Question: Among all the root beers sold in 2014, what is the percentage of the root beers produced by the brewery AJ Stephans Beverages?
Evidence: sold in 2014 refers to SUBSTR(TransactionDate, 1, 4) = '2014'; percentage = DIVIDE(MULTIPLY(SUM(BreweryName = 'AJ Stephans Beverages'), 1.0), COUNT(RootBeerID)) WHERE SUBSTR(TransactionDate, 1, 4) = '2014'; AJ Stephans Beverages refers to BreweryName = 'AJ Stephans Beverages';
SQL: SELECT CAST(COUNT(CASE WHEN T3.BreweryName = 'AJ Stephans Beverages' THEN 1 ELSE NULL END) AS REAL) * 100 / COUNT(T1.BrandID) FROM rootbeer AS T1 INNER JOIN `transaction` AS T2 ON T1.RootBeerID = T2.RootBeerID INNER JOIN rootbeerbrand AS T3 ON T1.BrandID = T3.BrandID WHERE T2.TransactionDate LIKE '2014%'
Database: beer_factory
Tables: customers, geolocation, location, rootbeerbrand, rootbeer, rootbeerreview, transaction
Columns (table index, column name): -1, *, 0, CustomerID, 0, First, 0, Last, 0, StreetAddress, 0, City, 0, State, 0, ZipCode, 0, Email, 0, PhoneNumber, 0, FirstPurchaseDate, 0, SubscribedToEmailList, 0, Gender, 1, LocationID, 1, Latitude, 1, Longitude, 2, LocationID, 2, LocationName, 2, StreetAddress, 2, City, 2, State, 2, ZipCode, 3, BrandID, 3, BrandName, 3, FirstBrewedYear, 3, BreweryName, 3, City, 3, State, 3, Country, 3, Description, 3, CaneSugar, 3, CornSyrup, 3, Honey, 3, ArtificialSweetener, 3, Caffeinated, 3, Alcoholic, 3, AvailableInCans, 3, AvailableInBottles, 3, AvailableInKegs, 3, Website, 3, FacebookPage, 3, Twitter, 3, WholesaleCost, 3, CurrentRetailPrice, 4, RootBeerID, 4, BrandID, 4, ContainerType, 4, LocationID, 4, PurchaseDate, 5, CustomerID, 5, BrandID, 5, StarRating, 5, ReviewDate, 5, Review, 6, TransactionID, 6, CreditCardNumber, 6, CustomerID, 6, TransactionDate, 6, CreditCardType, 6, LocationID, 6, RootBeerID, 6, PurchasePrice
Question: Tell the number of reviews given by James House.
Evidence: FALSE;
SQL: SELECT COUNT(T2.CustomerID) FROM customers AS T1 INNER JOIN rootbeerreview AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.First = 'James' AND T1.Last = 'House'
Database: beer_factory
Tables: customers, geolocation, location, rootbeerbrand, rootbeer, rootbeerreview, transaction
Columns (table index, column name): -1, *, 0, CustomerID, 0, First, 0, Last, 0, StreetAddress, 0, City, 0, State, 0, ZipCode, 0, Email, 0, PhoneNumber, 0, FirstPurchaseDate, 0, SubscribedToEmailList, 0, Gender, 1, LocationID, 1, Latitude, 1, Longitude, 2, LocationID, 2, LocationName, 2, StreetAddress, 2, City, 2, State, 2, ZipCode, 3, BrandID, 3, BrandName, 3, FirstBrewedYear, 3, BreweryName, 3, City, 3, State, 3, Country, 3, Description, 3, CaneSugar, 3, CornSyrup, 3, Honey, 3, ArtificialSweetener, 3, Caffeinated, 3, Alcoholic, 3, AvailableInCans, 3, AvailableInBottles, 3, AvailableInKegs, 3, Website, 3, FacebookPage, 3, Twitter, 3, WholesaleCost, 3, CurrentRetailPrice, 4, RootBeerID, 4, BrandID, 4, ContainerType, 4, LocationID, 4, PurchaseDate, 5, CustomerID, 5, BrandID, 5, StarRating, 5, ReviewDate, 5, Review, 6, TransactionID, 6, CreditCardNumber, 6, CustomerID, 6, TransactionDate, 6, CreditCardType, 6, LocationID, 6, RootBeerID, 6, PurchasePrice
Question: Show the credit card number of Lisa Ling.
Evidence: FALSE;
SQL: SELECT DISTINCT T2.CreditCardNumber FROM customers AS T1 INNER JOIN `transaction` AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.First = 'Lisa' AND T1.Last = 'Ling'
Database: beer_factory
Tables: customers, geolocation, location, rootbeerbrand, rootbeer, rootbeerreview, transaction
Columns (table index, column name): -1, *, 0, CustomerID, 0, First, 0, Last, 0, StreetAddress, 0, City, 0, State, 0, ZipCode, 0, Email, 0, PhoneNumber, 0, FirstPurchaseDate, 0, SubscribedToEmailList, 0, Gender, 1, LocationID, 1, Latitude, 1, Longitude, 2, LocationID, 2, LocationName, 2, StreetAddress, 2, City, 2, State, 2, ZipCode, 3, BrandID, 3, BrandName, 3, FirstBrewedYear, 3, BreweryName, 3, City, 3, State, 3, Country, 3, Description, 3, CaneSugar, 3, CornSyrup, 3, Honey, 3, ArtificialSweetener, 3, Caffeinated, 3, Alcoholic, 3, AvailableInCans, 3, AvailableInBottles, 3, AvailableInKegs, 3, Website, 3, FacebookPage, 3, Twitter, 3, WholesaleCost, 3, CurrentRetailPrice, 4, RootBeerID, 4, BrandID, 4, ContainerType, 4, LocationID, 4, PurchaseDate, 5, CustomerID, 5, BrandID, 5, StarRating, 5, ReviewDate, 5, Review, 6, TransactionID, 6, CreditCardNumber, 6, CustomerID, 6, TransactionDate, 6, CreditCardType, 6, LocationID, 6, RootBeerID, 6, PurchasePrice
Question: State the coordinate of Sac State American River Courtyard.
Evidence: coordinate = Latitude, Longitude; Sac State American River Courtyard refers to LocationName = 'Sac State American River Courtyard';
SQL: SELECT T2.Latitude, T2.Longitude FROM location AS T1 INNER JOIN geolocation AS T2 ON T1.LocationID = T2.LocationID WHERE T1.LocationName = 'Sac State American River Courtyard'
Database: beer_factory
Tables: customers, geolocation, location, rootbeerbrand, rootbeer, rootbeerreview, transaction
Columns (table index, column name): -1, *, 0, CustomerID, 0, First, 0, Last, 0, StreetAddress, 0, City, 0, State, 0, ZipCode, 0, Email, 0, PhoneNumber, 0, FirstPurchaseDate, 0, SubscribedToEmailList, 0, Gender, 1, LocationID, 1, Latitude, 1, Longitude, 2, LocationID, 2, LocationName, 2, StreetAddress, 2, City, 2, State, 2, ZipCode, 3, BrandID, 3, BrandName, 3, FirstBrewedYear, 3, BreweryName, 3, City, 3, State, 3, Country, 3, Description, 3, CaneSugar, 3, CornSyrup, 3, Honey, 3, ArtificialSweetener, 3, Caffeinated, 3, Alcoholic, 3, AvailableInCans, 3, AvailableInBottles, 3, AvailableInKegs, 3, Website, 3, FacebookPage, 3, Twitter, 3, WholesaleCost, 3, CurrentRetailPrice, 4, RootBeerID, 4, BrandID, 4, ContainerType, 4, LocationID, 4, PurchaseDate, 5, CustomerID, 5, BrandID, 5, StarRating, 5, ReviewDate, 5, Review, 6, TransactionID, 6, CreditCardNumber, 6, CustomerID, 6, TransactionDate, 6, CreditCardType, 6, LocationID, 6, RootBeerID, 6, PurchasePrice
Question: Provide the name of the location where transaction no.100885 happened.
Evidence: name of the location refers to LocationName; transaction no. refers to TransactionID; TransactionID = 100885;
SQL: SELECT T2.LocationName FROM `transaction` AS T1 INNER JOIN location AS T2 ON T1.LocationID = T2.LocationID WHERE T1.TransactionID = 100885
Database: beer_factory
Tables: customers, geolocation, location, rootbeerbrand, rootbeer, rootbeerreview, transaction
Columns (table index, column name): -1, *, 0, CustomerID, 0, First, 0, Last, 0, StreetAddress, 0, City, 0, State, 0, ZipCode, 0, Email, 0, PhoneNumber, 0, FirstPurchaseDate, 0, SubscribedToEmailList, 0, Gender, 1, LocationID, 1, Latitude, 1, Longitude, 2, LocationID, 2, LocationName, 2, StreetAddress, 2, City, 2, State, 2, ZipCode, 3, BrandID, 3, BrandName, 3, FirstBrewedYear, 3, BreweryName, 3, City, 3, State, 3, Country, 3, Description, 3, CaneSugar, 3, CornSyrup, 3, Honey, 3, ArtificialSweetener, 3, Caffeinated, 3, Alcoholic, 3, AvailableInCans, 3, AvailableInBottles, 3, AvailableInKegs, 3, Website, 3, FacebookPage, 3, Twitter, 3, WholesaleCost, 3, CurrentRetailPrice, 4, RootBeerID, 4, BrandID, 4, ContainerType, 4, LocationID, 4, PurchaseDate, 5, CustomerID, 5, BrandID, 5, StarRating, 5, ReviewDate, 5, Review, 6, TransactionID, 6, CreditCardNumber, 6, CustomerID, 6, TransactionDate, 6, CreditCardType, 6, LocationID, 6, RootBeerID, 6, PurchasePrice
Question: Which city does the customer who finished transaction no.103545 live in?
Evidence: transaction no. refers to TransactionID; TransactionID = 103545;
SQL: SELECT T1.City FROM customers AS T1 INNER JOIN `transaction` AS T2 ON T1.CustomerID = T2.CustomerID WHERE T2.TransactionID = 103545
Database: beer_factory
Tables: customers, geolocation, location, rootbeerbrand, rootbeer, rootbeerreview, transaction
Columns (table index, column name): -1, *, 0, CustomerID, 0, First, 0, Last, 0, StreetAddress, 0, City, 0, State, 0, ZipCode, 0, Email, 0, PhoneNumber, 0, FirstPurchaseDate, 0, SubscribedToEmailList, 0, Gender, 1, LocationID, 1, Latitude, 1, Longitude, 2, LocationID, 2, LocationName, 2, StreetAddress, 2, City, 2, State, 2, ZipCode, 3, BrandID, 3, BrandName, 3, FirstBrewedYear, 3, BreweryName, 3, City, 3, State, 3, Country, 3, Description, 3, CaneSugar, 3, CornSyrup, 3, Honey, 3, ArtificialSweetener, 3, Caffeinated, 3, Alcoholic, 3, AvailableInCans, 3, AvailableInBottles, 3, AvailableInKegs, 3, Website, 3, FacebookPage, 3, Twitter, 3, WholesaleCost, 3, CurrentRetailPrice, 4, RootBeerID, 4, BrandID, 4, ContainerType, 4, LocationID, 4, PurchaseDate, 5, CustomerID, 5, BrandID, 5, StarRating, 5, ReviewDate, 5, Review, 6, TransactionID, 6, CreditCardNumber, 6, CustomerID, 6, TransactionDate, 6, CreditCardType, 6, LocationID, 6, RootBeerID, 6, PurchasePrice
Question: What is the phone number of the customer who owns the credit card of number 6011179359005380?
Evidence: FALSE;
SQL: SELECT DISTINCT T1.PhoneNumber FROM customers AS T1 INNER JOIN `transaction` AS T2 ON T1.CustomerID = T2.CustomerID WHERE T2.CreditCardNumber = 6011179359005382