db_id
stringclasses
69 values
question
stringlengths
24
476
seed_question
stringlengths
24
362
evidence
stringlengths
1
673
sql
stringlengths
23
1.42k
dsl
unknown
reasoning
stringlengths
0
729
m_schema
stringlengths
24
9.02k
verified
bool
1 class
_dataset_source
stringclasses
2 values
bird_schema
stringclasses
69 values
ice_hockey_draft
What is the average number of goals scored by players in the 2007-2008 season of the WHL, excluding players from Stockholm, SWE, and those who played fewer than 10 games in that season?
What is the average number of goals scored by players in the 2007-2008 season of the WHL, excluding players from Stockholm, SWE?
name of the player refers to PlayerName; scored the most goals in a single game refers to MAX(G); WHL refers to LEAGUE = 'WHL'; 2007-2008 season refers to SEASON = '2007-2008';
SELECT AVG(T1.G) FROM SeasonStatus AS T1 INNER JOIN PlayerInfo AS T2 ON T1.ELITEID = T2.ELITEID WHERE T1.SEASON = '2007-2008' AND T1.LEAGUE = 'WHL' AND (T2.birthplace IS NULL OR NOT T2.birthplace LIKE 'Stockholm, SWE') AND T1.GP >= 10
{ "tables": [ "PlayerInfo", "SeasonStatus" ], "measures": [ { "agg": "AVG", "expr": "g", "alias": "" } ], "_source": "sqlite", "filters": [ "SeasonStatus.SEASON = '2007-2008'", "SeasonStatus.LEAGUE = 'WHL'", "(PlayerInfo.birthplace IS NULL OR NOT PlayerInfo.birt...
Added a condition to exclude players who played fewer than 10 games in the 2007-2008 season. This ensures that the average is calculated only for players who met the minimum game threshold.
# height_info ( height_id ( e.g., `65`, `67` ), height_in_cm ( e.g., `165`, `170` ), height_in_inch ( e.g., `5'5"`, `5'7"` ) ) # weight_info ( weight_id ( e.g., `154`, `159` ), weight_in_kg ( e.g., `70`, `72` ), weight_in_lbs ( e.g., `154`, `159` ) ) # PlayerInfo ( ELITEID ( e.g., `9`, `18` ), PlayerName ( e.g., `David...
true
hard
CREATE TABLE PlayerInfo ( ELITEID INTEGER, PlayerName TEXT, birthdate TEXT, birthyear DATE, birthmonth INTEGER, birthday INTEGER, birthplace TEXT, nation TEXT, height INTEGER, weight INTEGER, position_info TEXT, shoots TEXT, draftyear INTEGER, draftround INTEGER, ...
works_cycles
Retrieve the additional contact information of the oldest salesperson with a sales quota of at least 250,000, and ensure that this salesperson has also been involved in at least one sales order.
Retrieve the additional contact information of the oldest salesperson with a sales quota of at least 250,000.
Sales person refers to PersonType = 'SP'; oldest employee refers to Max (Subtract((now())-BirthDate));
SELECT T2.AdditionalContactInfo FROM Employee AS T1 INNER JOIN Person AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID INNER JOIN SalesPerson AS T3 ON T1.BusinessEntityID = T3.BusinessEntityID INNER JOIN SalesOrderHeader AS T4 ON T3.BusinessEntityID = T4.SalesPersonID WHERE T2.PersonType = 'SP' AND T3.SalesQuota >= 2...
{ "tables": [ "Employee", "Person", "SalesOrderHeader", "SalesPerson" ], "dimensions": [ "additional_contact_info" ], "order_by": [ { "expr": "birth_date", "desc": false } ], "limit": 1, "group_by": [ "Employee.BusinessEntityID", "additional_contact_info" ...
Added a join with SalesOrderHeader to ensure the salesperson has been involved in at least one sales order. The GROUP BY clause ensures that the selection of the oldest salesperson is based on unique salesperson IDs and their contact information. The ORDER BY and LIMIT clauses are used to find the oldest salesperson me...
# CountryRegion ( CountryRegionCode, Name, ModifiedDate ) # Culture ( CultureID, Name, ModifiedDate ) # Currency ( CurrencyCode, Name, ModifiedDate ) # CountryRegionCurrency ( CountryRegionCode, CurrencyCode, ModifiedDate ) # Person ( BusinessEntityID, PersonType, NameStyle, Title, FirstName, MiddleName, LastName, Suff...
true
hard
CREATE TABLE Address ( AddressID INTEGER, AddressLine1 TEXT, AddressLine2 TEXT, City TEXT, StateProvinceID INTEGER, PostalCode TEXT, SpatialLocation TEXT, rowguid TEXT, ModifiedDate DATETIME ); CREATE TABLE AddressType ( AddressTypeID INTEGER, Name TEXT, rowguid TEXT, ...
works_cycles
Which store has the highest total sales and what is its address?
Where can I find the Valley Bicycle Specialists store?
Valley Bicycle Specialists is a name of store; full address = AddressLine1+AddressLine2;
SELECT T2.AddressLine1, T2.AddressLine2, SUM(T4.TotalDue) AS TotalSales FROM BusinessEntityAddress AS T1 INNER JOIN Address AS T2 ON T1.AddressID = T2.AddressID INNER JOIN Store AS T3 ON T1.BusinessEntityID = T3.BusinessEntityID INNER JOIN SalesOrderHeader AS T4 ON T3.BusinessEntityID = T4.CustomerID GROUP BY T3.Name, ...
{ "tables": [ "Address", "BusinessEntityAddress", "SalesOrderHeader", "Store" ], "dimensions": [ "address_line1", "address_line2" ], "measures": [ { "agg": "SUM", "expr": "SalesOrderHeader.TotalDue", "alias": "TotalSales" } ], "order_by": [ { "ex...
The query joins the necessary tables to find the store with the highest total sales. It groups by store name and address, calculates the total sales, and orders the results in descending order to get the store with the highest sales. The LIMIT 1 ensures only the top store is returned.
# CountryRegion ( CountryRegionCode, Name, ModifiedDate ) # Culture ( CultureID, Name, ModifiedDate ) # Currency ( CurrencyCode, Name, ModifiedDate ) # CountryRegionCurrency ( CountryRegionCode, CurrencyCode, ModifiedDate ) # Person ( BusinessEntityID, PersonType, NameStyle, Title, FirstName, MiddleName, LastName, Suff...
true
hard
CREATE TABLE Address ( AddressID INTEGER, AddressLine1 TEXT, AddressLine2 TEXT, City TEXT, StateProvinceID INTEGER, PostalCode TEXT, SpatialLocation TEXT, rowguid TEXT, ModifiedDate DATETIME ); CREATE TABLE AddressType ( AddressTypeID INTEGER, Name TEXT, rowguid TEXT, ...
language_corpus
For the biwords pair that appears exactly 116430 times, what is the second word of the pair and the language it belongs to? Additionally, list the number of pages in that language.
For the biwords pair that appears exactly 116430 times, what is the second word of the pair and the language it belongs to?
the biwords pair that appears "116430" times refers to occurrences = 116430; second word of the pair refers to w2nd
SELECT T1.word, T3.lang, T3.pages FROM words AS T1 INNER JOIN biwords AS T2 ON T1.wid = T2.w2nd INNER JOIN langs AS T3 ON T2.lid = T3.lid WHERE T2.occurrences = 116430
{ "tables": [ "biwords", "langs", "words" ], "dimensions": [ "word", "lang", "pages" ], "_source": "sqlite", "filters": [ "biwords.occurrences = 116430", "words.wid = biwords.w2nd", "biwords.lid = langs.lid" ] }
The query now includes the number of pages in the language of the second word of the biwords pair that appears exactly 116430 times. This adds complexity by requiring an additional column from the `langs` table.
# langs ( lid ( e.g., `1` ), lang ( e.g., `ca` ), locale ( e.g., `ca_ES` ), pages ( e.g., `1129144` ), words ( e.g., `2764996` ) ) # pages ( pid ( e.g., `1`, `2` ), lid ( e.g., `1` ), page ( e.g., `1`, `2` ), revision ( e.g., `28236978`, `24086480` ), title ( e.g., `Àbac`, `Abadia` ), words ( e.g., `1081`, `68` ) ) # w...
true
hard
CREATE TABLE biwords ( lid INTEGER, w1st INTEGER, w2nd INTEGER, occurrences INTEGER, FOREIGN KEY (w2nd) REFERENCES words (wid), FOREIGN KEY (w1st) REFERENCES words (wid), FOREIGN KEY (lid) REFERENCES langs (lid) ); CREATE TABLE langs ( lid INTEGER, lang TEXT, locale TEXT, pa...