Database: books
Question: Provide the number of orders by Daisey Lamball in 2021.
Evidence: in 2021 refers to order_date LIKE '2021%'
SQL: SELECT COUNT(*) FROM cust_order AS T1 INNER JOIN customer AS T2 ON T1.customer_id = T2.customer_id WHERE T2.first_name = 'Daisey' AND T2.last_name = 'Lamball' AND STRFTIME('%Y', T1.order_date) = '2021'

Database: authors
Question: Among papers that were published in 2005, provide the author name of paper with key words of "LOAD; IDE; SNP; haplotype; asso- ciation studies".
Evidence: in 2005 refers to Year = '2005'; key words of "LOAD; IDE; SNP; haplotype; asso- ciation studies" refers to Keyword = 'LOAD; IDE; SNP; haplotype; asso- ciation studies'
SQL: SELECT T2.Name FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId WHERE T1.Year = 2005 AND T1.Keyword = 'KEY WORDS: LOAD IDE SNP haplotype asso- ciation studies'

Database: retail_complains
Question: In which region have the most 1-star reviews been done?
Evidence: most 1-star reviews refers to MAX(COUNT(stars = 1));
SQL: SELECT T3.Region FROM reviews AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id INNER JOIN state AS T3 ON T2.state_abbrev = T3.StateCode WHERE T1.Stars = 1 GROUP BY T3.Region ORDER BY COUNT(T3.Region) DESC LIMIT 1

Database: world_development_indicators
Question: What is the series code for number of infant deaths in year 1965 for the country whose full name is Islamic State of Afghanistan?
Evidence: number of infant deaths refers to IndicatorName = 'Number of infant deaths'; in year 1965 refers to Year = '1965'; full name is Islamic State of Afghanistan refers to LongName = 'Islamic State of Afghanistan'
SQL: SELECT DISTINCT T3.Seriescode FROM Country AS T1 INNER JOIN Indicators AS T2 ON T1.CountryCode = T2.CountryCode INNER JOIN CountryNotes AS T3 ON T2.CountryCode = T3.Countrycode WHERE T2.IndicatorName = 'Number of infant deaths' AND T1.LongName = 'Islamic State of Afghanistan' AND T2.Year = 1965

Database: public_review_platform
Question: List by ID the businesses with the reviews with the lowest veracity of Paradise Valley.
Evidence: ID of businesses refers to business_id; reviews with the lowest veracity refers to review_count = 'Low' AND stars > 3; Paradise Valley is a city
SQL: SELECT business_id FROM Business WHERE stars > 3 AND city = 'Paradise Valley' AND review_count = 'Low'

Database: retail_complains
Question: How many complaints from female clients born in the year 2000 were not sent through the web?
Evidence: female refers to sex = 'Female'; sent through refers to "Submitted via"; not sent through web refers to "Submitted via" ! = 'Web';

SQL: SELECT COUNT(T2.`Submitted via`) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T1.sex = 'Female' AND T1.year = 2000 AND T2.`Submitted via` != 'Web'

Database: movie_3
Question: Who is the staff manager of the store with the most non-active customers?
Evidence: most non-active customer refers to Max(Count(active = 0))
SQL: SELECT T.first_name, T.last_name FROM ( SELECT T3.first_name, T3.last_name, COUNT(T1.customer_id) AS num FROM customer AS T1 INNER JOIN store AS T2 ON T1.store_id = T2.store_id INNER JOIN staff AS T3 ON T2.store_id = T3.store_id WHERE T1.active = 0 GROUP BY T3.first_name, T3.last_name ) AS T ORDER BY T.num DESC LIMIT 1

Database: restaurant
Question: What is the address of the Peking Duck restaurant?
Evidence: address refers to street_num, street_name; Peking Duck restaurant refers to label = 'peking duck restaurant'
SQL: SELECT T2.street_name FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T1.label = 'peking duck restaurant'

Database: movie_platform
Question: Which year had the most released films?
Evidence: year refers to movie_release_year; most release films refers to MAX(COUNT(movie_id))


SQL: SELECT movie_release_year FROM movies GROUP BY movie_release_year ORDER BY COUNT(movie_id) DESC LIMIT 1

Database: chicago_crime
Question: In the South side community, what is the name of the community with the most reported incidents of unlawful taking, carrying, leading, or riding away of property from the possession or constructive possession of another person?
Evidence: "unlawful taking, carrying, leading, or riding away of property from the possession or constructive possession of another person" is the description; name of community refer to community_area_name; most reported incidents refers to Max(Count(fbi_code_no))
SQL: SELECT T3.community_area_name FROM FBI_Code AS T1 INNER JOIN Crime AS T2 ON T1.fbi_code_no = T2.fbi_code_no INNER JOIN Community_Area AS T3 ON T2.community_area_no = T3.community_area_no WHERE T3.side = 'South' AND T1.description = 'The unlawful taking, carrying, leading, or riding away of property FROM the possession or constructive possession of another person.' GROUP BY T3.community_area_name ORDER BY COUNT(T1.fbi_code_no) DESC LIMIT 1

Database: address
Question: Which zip code in Massachusetts that have more than 1 area code?
Evidence: "Massachusetts" is the state; zip code more than 1 area code refers to Count (zip_code) > 1
SQL: SELECT T1.zip_code FROM area_code AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T2.state = 'MA' GROUP BY T1.zip_code HAVING COUNT(T1.area_code) > 1

Database: world
Question: List down the languages of countries with an independence year between 1980 to 1995.
Evidence: independence year between 1980 to 1995 refers to IndepYear BETWEEN 1980 AND 1995;
SQL: SELECT T2.Name, T1.Language FROM CountryLanguage AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.Code WHERE T2.IndepYear BETWEEN 1980 AND 1995

Database: superstore
Question: Among the orders from 2016 in the Central region, what is the product with the lowest profit?
Evidence: orders from 2016 refers to "Order Date" = '2016%'; product refers to "Product Name"; lowest profit refers to min(Profit)
SQL: SELECT T2.`Product Name` FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T2.Region = 'Central' AND STRFTIME('%Y', T1.`Order Date`) = '2016' ORDER BY T1.Profit ASC LIMIT 1

Database: regional_sales
Question: Calculate the average net profit of phones which have sales channel of distributor.
Evidence: net profit can be computed as SUBTRACT(Unit Price, Unit Cost); AVG(net profit) where Product Name = 'Phones' and Sales Channel = 'Distributor';
SQL: SELECT SUM(REPLACE(T1.`Unit Price`, ',', '') - REPLACE(T1.`Unit Cost`, ',', '')) / COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T2.ProductID = T1._ProductID WHERE T2.`Product Name` = 'Phones' AND T1.`Sales Channel` = 'Distributor'

Database: language_corpus
Question: How many times greater is the appearances of the biword pair "a base" than "a decimal"?
Evidence: a, base AND decimal are words; wid is the ID of word; w1st is the first word of a biword pair; w2nd is the second word of a biword pair; appearances refers to biwords.occurrences; biword pair 'a base' refers to word = 'a' as w1st AND word = 'base' as w2nd; biword pair 'a decimal' refers to word = 'a' as w1st AND word = 'decimal' as w2nd; appearances of 'a base' greater than 'a decimal' refers to DIVIDE(SUBTRACT(biwords.occurrences'a base', biwords.occurrences'a decimal'), biwords.occurrences'a decimal')
SQL: SELECT CAST(occurrences AS REAL) / ( SELECT occurrences FROM biwords WHERE w1st = ( SELECT wid FROM words WHERE word = 'a' ) AND w2nd = ( SELECT wid FROM words WHERE word = 'decimal' ) ) FROM biwords WHERE w1st = ( SELECT wid FROM words WHERE word = 'a' ) AND w2nd = ( SELECT wid FROM words WHERE word = 'base' )

Database: movie_3
Question: How many cities are there in the United States?
Evidence: "United States" is the country
SQL: SELECT COUNT(T2.city) FROM country AS T1 INNER JOIN city AS T2 ON T1.country_id = T2.country_id WHERE T1.country = 'United States'