Database: superstore
Question: Among the customers who have ordered the product "Telescoping Adjustable Floor Lamp", how many of them are consumers?
Evidence: "Telescoping Adjustable Floor Lamp" is a "Product Name"; consumers refers to Segment = 'Consumer';
SQL: SELECT COUNT(DISTINCT T1.`Customer Name`) FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID` INNER JOIN product AS T3 ON T3.`Product ID` = T2.`Product ID` WHERE T3.`Product Name` = 'Telescoping Adjustable Floor Lamp' AND T1.Segment = 'Consumer'

Database: synthea
Question: What drug is administered more often to treat child attention deficit disorder?
Evidence: drug that was administered refers to medications.DESCRIPTION; child attention deficit disorder refers to medications.REASONDESCRIPTION = 'Child attention deficit disorder';
SQL: SELECT DESCRIPTION FROM medications WHERE REASONDESCRIPTION = 'Child attention deficit disorder' GROUP BY DESCRIPTION ORDER BY COUNT(DESCRIPTION) DESC LIMIT 1

Database: car_retails
Question: What was the contact name for the check "NR157385"?
Evidence: Contact name refers to customerName;
SQL: SELECT t2.contactFirstName, t2.contactLastName FROM payments AS t1 INNER JOIN customers AS t2 ON t1.customerNumber = t2.customerNumber WHERE t1.checkNumber = 'NR157385'

Database: professional_basketball
Question: How many first round draft player in 1996 NBA draft became an All-Star?
Evidence: first round refers to round = 1; in 1996 refers to year = 1996; NBA refers to lgID = 'NBA'
SQL: SELECT COUNT(T2.playerID) FROM draft AS T1 INNER JOIN player_allstar AS T2 ON T1.playerID = T2.playerID WHERE T1.draftYear = 1996 AND T1.draftRound = 1

Database: movies_4
Question: List the genres of Forrest Gump movie.
Evidence: genres refers to genre_name; Forrest Gump movie refers to title = 'Forrest Gump'
SQL: SELECT T3.genre_name FROM movie AS T1 INNER JOIN movie_genres AS T2 ON T1.movie_id = T2.movie_id INNER JOIN genre AS T3 ON T2.genre_id = T3.genre_id WHERE T1.title = 'Forrest Gump'

Database: superstore
Question: What are the names of the products with a profit of no less than 1,000 in one single order?
Evidence: profit of no less than 1,000 refers to Profit > = 1000; names of the products refers to "Product Name"
SQL: SELECT DISTINCT T2.`Product Name` FROM west_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T1.Profit > 1000

Database: codebase_comments
Question: Please provide a link to the most well-known repository's Github address.
Evidence: link refers to Url; well-known repository refers to MAX(Watchers);
SQL: SELECT Url FROM Repo WHERE Watchers = ( SELECT MAX(Watchers) FROM Repo )

Database: trains
Question: Among the cars on a train that runs in the east direction, how many of them have a flat roof and a circle load shape?
Evidence: flat roof refers to roof = 'flat'; load_shape = 'circle'
SQL: SELECT SUM(CASE WHEN T1.load_shape = 'circle' THEN 1 ELSE 0 END)as count FROM cars AS T1 INNER JOIN trains AS T2 ON T1.train_id = T2.id WHERE T2.direction = 'east' AND T1.roof = 'flat'

Database: world
Question: What is the GNP of the least crowded city in the world?
Evidence: least crowded city refers to MIN(Population);
SQL: SELECT T2.GNP FROM City AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.Code ORDER BY T1.Population ASC LIMIT 1

Database: car_retails
Question: How many customers who are in Norway and have credit line under 220000?
Evidence: Norway is a country; credit line refers to creditLimit; creditLimit<220000;
SQL: SELECT COUNT(creditLimit) FROM customers WHERE creditLimit < 220000 AND country = 'Norway'

Database: movie_3
Question: State the number of addresses in the Nordrhein-Westfalen district.
Evidence: number of address refers to address_id
SQL: SELECT COUNT(address_id) FROM address WHERE district = 'Nordrhein-Westfalen'

Database: app_store
Question: What is the percentage ratio between positive sentiments and negative sentiments that are in Fate/Grand Order? Also indicate the current version.
Evidence: Fate/Grand Order is the App; percentage ratio = MULTIPLY(DIVIDE((SUM(Sentiment = 'Positive')), (SUM(Sentiment = 'Negative'))), 100);
SQL: SELECT CAST(SUM(CASE WHEN T2.Sentiment = 'Positive' THEN 1 ELSE 0 END) AS REAL) * 100 / SUM(CASE WHEN T2.Sentiment = 'Negative' THEN 1 ELSE 0 END), T1.`Current Ver` FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T1.App = 'Fate/Grand Order (English)' AND T1.`Current Ver` = '1.18.0'

Database: shooting
Question: How many more black female victims than white female victims were discovered?
Evidence: black refers to race = 'B'; female refers to gender = 'F'; white refers to race = 'W'; result = subtract(count(victims where race = 'B'), count(victims where race = 'W')) where gender = 'F'
SQL: SELECT SUM(race = 'B') - SUM(race = 'W') FROM subjects WHERE gender = 'F'

Database: books
Question: Name the title of books written by author A.J.Ayer.
Evidence: "A.J. Ayer" is the author_name;
SQL: SELECT T3.title FROM book_author AS T1 INNER JOIN author AS T2 ON T1.author_id = T2.author_id INNER JOIN book AS T3 ON T3.book_id = T1.book_id WHERE T2.author_name = 'A.J. Ayer'

Database: sales_in_weather
Question: State the number of stores that belongs to the weather station which recorded the deepest snowfall.
Evidence: deepest snowfall refers to Max(snowfall); number of stores refers to store_nbr
SQL: SELECT T2.store_nbr FROM weather AS T1 INNER JOIN relation AS T2 ON T1.station_nbr = T2.station_nbr ORDER BY snowfall DESC LIMIT 1

Database: book_publishing_company
Question: State the royalty percentage for the most year to date sale title within the 20000 range.
Evidence: most year to date sales refers to MAX(ytd_sales); range limit means high range which refers to hirange; the 20000 range refers to hirange<20000
SQL: SELECT MAX(T1.ytd_sales) FROM titles AS T1 INNER JOIN roysched AS T2 ON T1.title_id = T2.title_id WHERE T2.lorange > 20000 AND T2.hirange < 20000

Database: donor
Question: State the name of vendor that supplies book resources to all school with literacy subject as their primary focus.
Evidence: literacy subject as primary focus refers to primary_focus_subject = 'Literacy'
SQL: SELECT DISTINCT T1.vendor_name FROM resources AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid WHERE T2.primary_focus_subject LIKE 'Literacy'

Database: retail_world
Question: Please give the contact name for Tokyo Traders.
Evidence: Tokyo Traders refers to CompanyName = 'Tokyo Traders'
SQL: SELECT ContactName FROM Suppliers WHERE CompanyName = 'Tokyo Traders'

Database: book_publishing_company
Question: How many books on business have the bookstores in Massachusetts ordered?
Evidence: Massachusetts is a state; business books refers to type = 'business'
SQL: SELECT SUM(T1.qty) FROM sales AS T1 INNER JOIN stores AS T2 ON T1.stor_id = T2.stor_id INNER JOIN titles AS T3 ON T1.title_id = T3.title_id WHERE T2.state = 'Massachusetts' AND T3.type = 'business'

Database: retail_world
Question: What is the last name of the employees who must report to the Vice President of Sales?
Evidence: report to represents a hierarchical relationship where the person being reported to is usually the direct supervisor of the reporter; Vice President of Sales refers to Title = 'Vice President, Sales';
SQL: SELECT LastName FROM Employees WHERE ReportsTo = ( SELECT EmployeeID FROM Employees WHERE Title = 'Vice President, Sales' )

Database: authors
Question: Within the year of 2001 to 2010, find the paper published rate of 2001.
Evidence: year of 2001 to 2010 refers to Year BETWEEN 2001 AND 2010; Percentage = Divide(Count (PaperId(Year = 2001)), Count (PaperID(Year BETWEEN 2001 AND 2010))) * 100
SQL: SELECT CAST(SUM(CASE WHEN Year = 2001 THEN 1 ELSE 0 END) AS REAL) / COUNT(Id) FROM Paper WHERE Year >= 2001 AND Year < 2011