question string | answer string | context string | dialect string | spider_hardness string | extended_hardness string | classification_status string | syntax_status string | ddl_syntax_status string | schema_status string | syntax_errors list | ddl_syntax_errors list | schema_errors list | classification_errors list | status_history list | correction_status string | component1 int64 | component2 int64 | others int64 | validation_source dict |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
How many parties do we have? | SELECT COUNT(DISTINCT party_name) FROM party | CREATE TABLE party (party_name VARCHAR(255), Id VARCHAR(255)) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 0 | 0 | 0 | {
"split": "train",
"row_index": 1215
} |
Show the ministers and the time they took and left office, listed by the time they left office. | SELECT minister, took_office, left_office FROM party ORDER BY left_office | CREATE TABLE party (minister VARCHAR(255), took_office VARCHAR(255), left_office VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 1 | {
"split": "train",
"row_index": 1216
} |
Show the minister who took office after 1961 or before 1959. | SELECT minister FROM party WHERE took_office > 1961 OR took_office < 1959 | CREATE TABLE party (minister VARCHAR(255), took_office VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 1 | {
"split": "train",
"row_index": 1217
} |
Show all ministers who do not belong to Progress Party. | SELECT minister FROM party WHERE party_name <> 'Progress Party' | CREATE TABLE party (minister VARCHAR(255), party_name VARCHAR(255)) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 0 | {
"split": "train",
"row_index": 1218
} |
Show all ministers and parties they belong to in descending order of the time they took office. | SELECT minister, party_name FROM party ORDER BY took_office DESC | CREATE TABLE party (minister VARCHAR(255), party_name VARCHAR(255), took_office VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 1 | {
"split": "train",
"row_index": 1219
} |
Return the minister who left office at the latest time. | SELECT minister FROM party ORDER BY left_office DESC LIMIT 1 | CREATE TABLE party (minister VARCHAR(255), left_office VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 0 | {
"split": "train",
"row_index": 1220
} |
List member names and their party names. | SELECT T1.member_name, T2.party_name FROM Member AS T1 JOIN party AS T2 ON T1.party_id = T2.party_id | CREATE TABLE party (party_name VARCHAR(255), party_id VARCHAR(255)); CREATE TABLE Member (member_name VARCHAR(255), party_id VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 1 | {
"split": "train",
"row_index": 1221
} |
Show all party names and the number of members in each party. | SELECT T2.party_name, COUNT(*) FROM Member AS T1 JOIN party AS T2 ON T1.party_id = T2.party_id GROUP BY T1.party_id | CREATE TABLE party (party_name VARCHAR(255), party_id VARCHAR(255)); CREATE TABLE Member (party_id VARCHAR(255), member_name VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 1 | {
"split": "train",
"row_index": 1222
} |
What is the name of party with most number of members? | SELECT T2.party_name FROM Member AS T1 JOIN party AS T2 ON T1.party_id = T2.party_id GROUP BY T1.party_id ORDER BY COUNT(*) DESC LIMIT 1 | CREATE TABLE party (party_name VARCHAR(255), party_id VARCHAR(255)); CREATE TABLE Member (party_id VARCHAR(255), member_name VARCHAR(255)) | generic | extra | extra | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 4 | 0 | 0 | {
"split": "train",
"row_index": 1223
} |
Show all party names and their region names. | SELECT T1.party_name, T2.region_name FROM party AS T1 JOIN region AS T2 ON T1.region_id = T2.region_id | CREATE TABLE region (region_name VARCHAR(255), region_id VARCHAR(255)); CREATE TABLE party (party_name VARCHAR(255), region_id VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 1 | {
"split": "train",
"row_index": 1224
} |
Show names of parties that does not have any members. | SELECT party_name FROM party WHERE NOT party_id IN (SELECT party_id FROM Member) | CREATE TABLE party (party_name VARCHAR(255), party_id VARCHAR(255)); CREATE TABLE Member (party_name VARCHAR(255), party_id VARCHAR(255)) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 1 | 0 | {
"split": "train",
"row_index": 1225
} |
Show the member names which are in both the party with id 3 and the party with id 1. | SELECT member_name FROM member WHERE party_id = 3 INTERSECT SELECT member_name FROM member WHERE party_id = 1 | CREATE TABLE member (member_name VARCHAR(255), party_id VARCHAR(255)) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 1 | 0 | {
"split": "train",
"row_index": 1226
} |
Show member names that are not in the Progress Party. | SELECT T1.member_name FROM Member AS T1 JOIN party AS T2 ON T1.party_id = T2.party_id WHERE T2.Party_name <> 'Progress Party' | CREATE TABLE party (party_id VARCHAR(255), Party_name VARCHAR(255)); CREATE TABLE Member (member_name VARCHAR(255), party_id VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 0 | {
"split": "train",
"row_index": 1227
} |
How many party events do we have? | SELECT COUNT(*) FROM party_events | CREATE TABLE party_events (Id VARCHAR(255), description VARCHAR(255)) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 0 | 0 | 0 | {
"split": "train",
"row_index": 1228
} |
Show party names and the number of events for each party. | SELECT T2.party_name, COUNT(*) FROM party_events AS T1 JOIN party AS T2 ON T1.party_id = T2.party_id GROUP BY T1.party_id | CREATE TABLE party (party_name VARCHAR(255), party_id VARCHAR(255)); CREATE TABLE party_events (party_id VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 1 | {
"split": "train",
"row_index": 1229
} |
What are the names of parties with at least 2 events? | SELECT T2.party_name FROM party_events AS T1 JOIN party AS T2 ON T1.party_id = T2.party_id GROUP BY T1.party_id HAVING COUNT(*) >= 2 | CREATE TABLE party (party_name VARCHAR(255), party_id VARCHAR(255)); CREATE TABLE party_events (party_id VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 0 | {
"split": "train",
"row_index": 1231
} |
What is the name of member in charge of greatest number of events? | SELECT T1.member_name FROM member AS T1 JOIN party_events AS T2 ON T1.member_id = T2.member_in_charge_id GROUP BY T2.member_in_charge_id ORDER BY COUNT(*) DESC LIMIT 1 | CREATE TABLE party_events (member_in_charge_id VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT); CREATE TABLE member (member_name VARCHAR(255), member_id VARCHAR(255)) | generic | extra | extra | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 4 | 0 | 0 | {
"split": "train",
"row_index": 1232
} |
find the event names that have more than 2 records. | SELECT event_name FROM party_events GROUP BY event_name HAVING COUNT(*) > 2 | CREATE TABLE party_events (event_name VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 0 | {
"split": "train",
"row_index": 1233
} |
How many Annual Meeting events happened in the United Kingdom region? | SELECT COUNT(*) FROM region AS t1 JOIN party AS t2 ON t1.region_id = t2.region_id JOIN party_events AS t3 ON t2.party_id = t3.party_id WHERE t1.region_name = 'United Kingdom' AND t3.Event_Name = 'Annaual Meeting' | CREATE TABLE party_events (party_id VARCHAR(255), Event_Name VARCHAR(255)); CREATE TABLE region (region_id VARCHAR(255), region_name VARCHAR(255)); CREATE TABLE party (region_id VARCHAR(255), party_id VARCHAR(255)) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 3 | 0 | 1 | {
"split": "train",
"row_index": 1234
} |
How many pilots are there? | SELECT COUNT(*) FROM pilot | CREATE TABLE pilot (Id VARCHAR(255), Pilot_name VARCHAR(255)) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 0 | 0 | 0 | {
"split": "train",
"row_index": 1235
} |
List the names of pilots in ascending order of rank. | SELECT Pilot_name FROM pilot ORDER BY Rank | CREATE TABLE pilot (Pilot_name VARCHAR(255), Rank VARCHAR(255)) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 0 | {
"split": "train",
"row_index": 1236
} |
What are the positions and teams of pilots? | SELECT POSITION, Team FROM pilot | CREATE TABLE pilot (POSITION VARCHAR(255), Team VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 0 | 0 | 1 | {
"split": "train",
"row_index": 1237
} |
List the distinct positions of pilots older than 30. | SELECT DISTINCT POSITION FROM pilot WHERE Age > 30 | CREATE TABLE pilot (POSITION VARCHAR(255), Age INTEGER) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 0 | {
"split": "train",
"row_index": 1238
} |
Show the names of pilots from team "Bradley" or "Fordham". | SELECT Pilot_name FROM pilot WHERE Team = 'Bradley' OR Team = 'Fordham' | CREATE TABLE pilot (Pilot_name VARCHAR(255), Team VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 1 | {
"split": "train",
"row_index": 1239
} |
What is the joined year of the pilot of the highest rank? | SELECT Join_Year FROM pilot ORDER BY Rank LIMIT 1 | CREATE TABLE pilot (Join_Year VARCHAR(255), Rank VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 0 | {
"split": "train",
"row_index": 1240
} |
What are the different nationalities of pilots? Show each nationality and the number of pilots of each nationality. | SELECT Nationality, COUNT(*) FROM pilot GROUP BY Nationality | CREATE TABLE pilot (Nationality VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 1 | {
"split": "train",
"row_index": 1241
} |
Show the most common nationality of pilots. | SELECT Nationality FROM pilot GROUP BY Nationality ORDER BY COUNT(*) DESC LIMIT 1 | CREATE TABLE pilot (Nationality VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 3 | 0 | 0 | {
"split": "train",
"row_index": 1242
} |
Show the pilot positions that have both pilots joining after year 2005 and pilots joining before 2000. | SELECT POSITION FROM pilot WHERE Join_Year < 2000 INTERSECT SELECT POSITION FROM pilot WHERE Join_Year > 2005 | CREATE TABLE pilot (POSITION VARCHAR(255), Join_Year INTEGER) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 1 | 0 | {
"split": "train",
"row_index": 1243
} |
Show the names of pilots and models of aircrafts they have flied with. | SELECT T3.Pilot_name, T2.Model FROM pilot_record AS T1 JOIN aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN pilot AS T3 ON T1.Pilot_ID = T3.Pilot_ID | CREATE TABLE pilot_record (Aircraft_ID VARCHAR(255), Pilot_ID VARCHAR(255)); CREATE TABLE pilot (Pilot_name VARCHAR(255), Pilot_ID VARCHAR(255)); CREATE TABLE aircraft (Model VARCHAR(255), Aircraft_ID VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 1 | {
"split": "train",
"row_index": 1244
} |
Show the names of pilots and fleet series of the aircrafts they have flied with in ascending order of the rank of the pilot. | SELECT T3.Pilot_name, T2.Fleet_Series FROM pilot_record AS T1 JOIN aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN pilot AS T3 ON T1.Pilot_ID = T3.Pilot_ID ORDER BY T3.Rank | CREATE TABLE pilot (Pilot_name VARCHAR(255), Pilot_ID VARCHAR(255), Rank VARCHAR(255)); CREATE TABLE pilot_record (Aircraft_ID VARCHAR(255), Pilot_ID VARCHAR(255)); CREATE TABLE aircraft (Fleet_Series VARCHAR(255), Aircraft_ID VARCHAR(255)) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 3 | 0 | 1 | {
"split": "train",
"row_index": 1245
} |
Show the fleet series of the aircrafts flied by pilots younger than 34 | SELECT T2.Fleet_Series FROM pilot_record AS T1 JOIN aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN pilot AS T3 ON T1.Pilot_ID = T3.Pilot_ID WHERE T3.Age < 34 | CREATE TABLE pilot_record (Aircraft_ID VARCHAR(255), Pilot_ID VARCHAR(255)); CREATE TABLE pilot (Pilot_ID VARCHAR(255), Age INTEGER); CREATE TABLE aircraft (Fleet_Series VARCHAR(255), Aircraft_ID VARCHAR(255)) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 3 | 0 | 0 | {
"split": "train",
"row_index": 1246
} |
Show the names of pilots and the number of records they have. | SELECT T2.Pilot_name, COUNT(*) FROM pilot_record AS T1 JOIN pilot AS T2 ON T1.pilot_ID = T2.pilot_ID GROUP BY T2.Pilot_name | CREATE TABLE pilot (Pilot_name VARCHAR(255), pilot_ID VARCHAR(255)); CREATE TABLE pilot_record (pilot_ID VARCHAR(255), detail VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 1 | {
"split": "train",
"row_index": 1247
} |
Show names of pilots that have more than one record. | SELECT T2.Pilot_name, COUNT(*) FROM pilot_record AS T1 JOIN pilot AS T2 ON T1.pilot_ID = T2.pilot_ID GROUP BY T2.Pilot_name HAVING COUNT(*) > 1 | CREATE TABLE pilot (Pilot_name VARCHAR(255), pilot_ID VARCHAR(255)); CREATE TABLE pilot_record (pilot_ID VARCHAR(255), detail VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 1 | {
"split": "train",
"row_index": 1248
} |
List the names of pilots that do not have any record. | SELECT Pilot_name FROM pilot WHERE NOT Pilot_ID IN (SELECT Pilot_ID FROM pilot_record) | CREATE TABLE pilot_record (Pilot_name VARCHAR(255), Pilot_ID VARCHAR(255)); CREATE TABLE pilot (Pilot_name VARCHAR(255), Pilot_ID VARCHAR(255)) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 1 | 0 | {
"split": "train",
"row_index": 1249
} |
What document status codes do we have? | SELECT document_status_code FROM Ref_Document_Status | CREATE TABLE Ref_Document_Status (document_status_code VARCHAR(255), document_status_description VARCHAR(255)) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 0 | 0 | 0 | {
"split": "train",
"row_index": 1250
} |
What is the description of document status code 'working'? | SELECT document_status_description FROM Ref_Document_Status WHERE document_status_code = 'working' | CREATE TABLE Ref_Document_Status (document_status_description VARCHAR(255), document_status_code VARCHAR(255)) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 0 | {
"split": "train",
"row_index": 1251
} |
What document type codes do we have? | SELECT document_type_code FROM Ref_Document_Types | CREATE TABLE Ref_Document_Types (document_type_code VARCHAR(255), document_type_description VARCHAR(255)) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 0 | 0 | 0 | {
"split": "train",
"row_index": 1252
} |
What is the description of document type 'Paper'? | SELECT document_type_description FROM Ref_Document_Types WHERE document_type_code = 'Paper' | CREATE TABLE Ref_Document_Types (document_type_description VARCHAR(255), document_type_code VARCHAR(255)) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 0 | {
"split": "train",
"row_index": 1253
} |
What are the shipping agent names? | SELECT shipping_agent_name FROM Ref_Shipping_Agents | CREATE TABLE Ref_Shipping_Agents (shipping_agent_name VARCHAR(255), shipping_agent_code VARCHAR(255)) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 0 | 0 | 0 | {
"split": "train",
"row_index": 1254
} |
What is the shipping agent code of shipping agent UPS? | SELECT shipping_agent_code FROM Ref_Shipping_Agents WHERE shipping_agent_name = 'UPS' | CREATE TABLE Ref_Shipping_Agents (shipping_agent_code VARCHAR(255), shipping_agent_name VARCHAR(255)) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 0 | {
"split": "train",
"row_index": 1255
} |
What are all role codes? | SELECT role_code FROM ROLES | CREATE TABLE ROLES (role_code VARCHAR(255), role_description VARCHAR(255)) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 0 | 0 | 0 | {
"split": "train",
"row_index": 1256
} |
What is the description of role code ED? | SELECT role_description FROM ROLES WHERE role_code = 'ED' | CREATE TABLE ROLES (role_description VARCHAR(255), role_code VARCHAR(255)) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 0 | {
"split": "train",
"row_index": 1257
} |
How many employees do we have? | SELECT COUNT(*) FROM Employees | CREATE TABLE Employees (Id VARCHAR(255), employee_name VARCHAR(255)) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 0 | 0 | 0 | {
"split": "train",
"row_index": 1258
} |
What is the role of the employee named Koby? | SELECT T1.role_description FROM ROLES AS T1 JOIN Employees AS T2 ON T1.role_code = T2.role_code WHERE T2.employee_name = 'Koby' | CREATE TABLE ROLES (role_description VARCHAR(255), role_code VARCHAR(255)); CREATE TABLE Employees (role_code VARCHAR(255), employee_name VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 0 | {
"split": "train",
"row_index": 1259
} |
List all document ids and receipt dates of documents. | SELECT document_id, receipt_date FROM Documents | CREATE TABLE Documents (document_id VARCHAR(255), receipt_date VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 0 | 0 | 1 | {
"split": "train",
"row_index": 1260
} |
How many employees does each role have? List role description, id and number of employees. | SELECT T1.role_description, T2.role_code, COUNT(*) FROM ROLES AS T1 JOIN Employees AS T2 ON T1.role_code = T2.role_code GROUP BY T2.role_code | CREATE TABLE ROLES (role_description VARCHAR(255), role_code VARCHAR(255)); CREATE TABLE Employees (role_code VARCHAR(255), employee_name VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 1 | {
"split": "train",
"row_index": 1261
} |
How many documents have the status code done? | SELECT COUNT(*) FROM Documents WHERE document_status_code = 'done' | CREATE TABLE Documents (document_status_code VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 0 | {
"split": "train",
"row_index": 1264
} |
List the document type code for the document with the id 2. | SELECT document_type_code FROM Documents WHERE document_id = 2 | CREATE TABLE Documents (document_type_code VARCHAR(255), document_id VARCHAR(255)) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 0 | {
"split": "train",
"row_index": 1265
} |
List the document ids for any documents with the status code done and the type code paper. | SELECT document_id FROM Documents WHERE document_status_code = 'done' AND document_type_code = 'Paper' | CREATE TABLE Documents (document_id VARCHAR(255), document_status_code VARCHAR(255), document_type_code VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 1 | {
"split": "train",
"row_index": 1266
} |
What is the receipt date of the document with id 3? | SELECT receipt_date FROM Documents WHERE document_id = 3 | CREATE TABLE Documents (receipt_date VARCHAR(255), document_id VARCHAR(255)) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 0 | {
"split": "train",
"row_index": 1270
} |
What is the mail date of the document with id 7? | SELECT mailing_date FROM Documents_Mailed WHERE document_id = 7 | CREATE TABLE Documents_Mailed (mailing_date VARCHAR(255), document_id VARCHAR(255)) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 0 | {
"split": "train",
"row_index": 1272
} |
What is draft detail of the document with id 7? | SELECT draft_details FROM Document_Drafts WHERE document_id = 7 | CREATE TABLE Document_Drafts (draft_details VARCHAR(255), document_id VARCHAR(255)) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 0 | {
"split": "train",
"row_index": 1275
} |
How many draft copies does the document with id 2 have? | SELECT COUNT(*) FROM Draft_Copies WHERE document_id = 2 | CREATE TABLE Draft_Copies (document_id VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 0 | {
"split": "train",
"row_index": 1276
} |
Which document has the most draft copies? List its document id and number of draft copies. | SELECT document_id, COUNT(copy_number) FROM Draft_Copies GROUP BY document_id ORDER BY COUNT(copy_number) DESC LIMIT 1 | CREATE TABLE Draft_Copies (document_id VARCHAR(255), copy_number VARCHAR(255)) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 3 | 0 | 2 | {
"split": "train",
"row_index": 1277
} |
Which documents have more than 1 draft copies? List document id and number of draft copies. | SELECT document_id, COUNT(*) FROM Draft_Copies GROUP BY document_id HAVING COUNT(*) > 1 | CREATE TABLE Draft_Copies (document_id VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 1 | {
"split": "train",
"row_index": 1278
} |
For each document, list the number of employees who have showed up in the circulation history of that document. List the document ids and number of employees. | SELECT document_id, COUNT(DISTINCT employee_id) FROM Circulation_History GROUP BY document_id | CREATE TABLE Circulation_History (document_id VARCHAR(255), employee_id VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 1 | {
"split": "train",
"row_index": 1282
} |
List all department names ordered by their starting date. | SELECT dname FROM department ORDER BY mgr_start_date | CREATE TABLE department (dname VARCHAR(255), mgr_start_date VARCHAR(255)) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 0 | {
"split": "train",
"row_index": 1283
} |
find all dependent names who have a spouse relation with some employee. | SELECT Dependent_name FROM dependent WHERE relationship = 'Spouse' | CREATE TABLE dependent (Dependent_name VARCHAR(255), relationship VARCHAR(255)) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 0 | {
"split": "train",
"row_index": 1284
} |
how many female dependents are there? | SELECT COUNT(*) FROM dependent WHERE sex = 'F' | CREATE TABLE dependent (sex VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 0 | {
"split": "train",
"row_index": 1285
} |
Find the names of departments that are located in Houston. | SELECT t1.dname FROM department AS t1 JOIN dept_locations AS t2 ON t1.dnumber = t2.dnumber WHERE t2.dlocation = 'Houston' | CREATE TABLE dept_locations (dnumber VARCHAR(255), dlocation VARCHAR(255)); CREATE TABLE department (dname VARCHAR(255), dnumber VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 0 | {
"split": "train",
"row_index": 1286
} |
Return the first names and last names of employees who earn more than 30000 in salary. | SELECT fname, lname FROM employee WHERE salary > 30000 | CREATE TABLE employee (fname VARCHAR(255), lname VARCHAR(255), salary INTEGER) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 1 | {
"split": "train",
"row_index": 1287
} |
Find the number of employees of each gender whose salary is lower than 50000. | SELECT COUNT(*), sex FROM employee WHERE salary < 50000 GROUP BY sex | CREATE TABLE employee (sex VARCHAR(255), salary INTEGER) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 1 | {
"split": "train",
"row_index": 1288
} |
list the first and last names, and the addresses of all employees in the ascending order of their birth date. | SELECT fname, lname, address FROM employee ORDER BY Bdate | CREATE TABLE employee (fname VARCHAR(255), lname VARCHAR(255), address VARCHAR(255), Bdate VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 1 | {
"split": "train",
"row_index": 1289
} |
what are the event details of the services that have the type code 'Marriage'? | SELECT T1.event_details FROM EVENTS AS T1 JOIN Services AS T2 ON T1.Service_ID = T2.Service_ID WHERE T2.Service_Type_Code = 'Marriage' | CREATE TABLE EVENTS (event_details VARCHAR(255), Service_ID VARCHAR(255)); CREATE TABLE Services (Service_ID VARCHAR(255), Service_Type_Code VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 0 | {
"split": "train",
"row_index": 1290
} |
How many events have each participants attended? List the participant id, type and the number. | SELECT T1.Participant_ID, T1.Participant_Type_Code, COUNT(*) FROM Participants AS T1 JOIN Participants_in_Events AS T2 ON T1.Participant_ID = T2.Participant_ID GROUP BY T1.Participant_ID | CREATE TABLE Participants (Participant_ID VARCHAR(255), Participant_Type_Code VARCHAR(255)); CREATE TABLE Participants_in_Events (Participant_ID VARCHAR(255), Event_ID VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 1 | {
"split": "train",
"row_index": 1292
} |
What are all the the participant ids, type code and details? | SELECT Participant_ID, Participant_Type_Code, Participant_Details FROM Participants | CREATE TABLE Participants (Participant_ID VARCHAR(255), Participant_Type_Code VARCHAR(255), Participant_Details VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 0 | 0 | 1 | {
"split": "train",
"row_index": 1293
} |
How many participants belong to the type 'Organizer'? | SELECT COUNT(*) FROM participants WHERE participant_type_code = 'Organizer' | CREATE TABLE participants (participant_type_code VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 0 | {
"split": "train",
"row_index": 1294
} |
List the type of the services in alphabetical order. | SELECT service_type_code FROM services ORDER BY service_type_code | CREATE TABLE services (service_type_code VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 0 | {
"split": "train",
"row_index": 1295
} |
List the service id and details for the events. | SELECT service_id, event_details FROM EVENTS | CREATE TABLE EVENTS (service_id VARCHAR(255), event_details VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 0 | 0 | 1 | {
"split": "train",
"row_index": 1296
} |
How many events had participants whose details had the substring 'Dr.' | SELECT COUNT(*) FROM participants AS T1 JOIN Participants_in_Events AS T2 ON T1.Participant_ID = T2.Participant_ID WHERE T1.participant_details LIKE '%Dr.%' | CREATE TABLE participants (Participant_ID VARCHAR(255), participant_details VARCHAR(255)); CREATE TABLE Participants_in_Events (Participant_ID VARCHAR(255), Event_ID VARCHAR(255)) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 3 | 0 | 0 | {
"split": "train",
"row_index": 1297
} |
What is the most common participant type? | SELECT participant_type_code FROM participants GROUP BY participant_type_code ORDER BY COUNT(*) DESC LIMIT 1 | CREATE TABLE participants (participant_type_code VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 3 | 0 | 0 | {
"split": "train",
"row_index": 1298
} |
Which service id and type has the least number of participants? | SELECT T3.service_id, T4.Service_Type_Code FROM participants AS T1 JOIN Participants_in_Events AS T2 ON T1.Participant_ID = T2.Participant_ID JOIN EVENTS AS T3 ON T2.Event_ID = T3.Event_ID JOIN services AS T4 ON T3.service_id = T4.service_id GROUP BY T3.service_id ORDER BY COUNT(*) LIMIT 1 | CREATE TABLE Participants_in_Events (Participant_ID VARCHAR(255), Event_ID VARCHAR(255)); CREATE TABLE services (Service_Type_Code VARCHAR(255), service_id VARCHAR(255)); CREATE TABLE EVENTS (service_id VARCHAR(255), Event_ID VARCHAR(255)); CREATE TABLE participants (Participant_ID VARCHAR(255), participant_type_code V... | generic | extra | extra | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 6 | 0 | 1 | {
"split": "train",
"row_index": 1299
} |
What is the id of the event with the most participants? | SELECT Event_ID FROM Participants_in_Events GROUP BY Event_ID ORDER BY COUNT(*) DESC LIMIT 1 | CREATE TABLE Participants_in_Events (Event_ID VARCHAR(255), participant_id VARCHAR(255)) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 3 | 0 | 0 | {
"split": "train",
"row_index": 1300
} |
Which services type had both successful and failure event details? | SELECT T1.service_type_code FROM services AS T1 JOIN EVENTS AS T2 ON T1.service_id = T2.service_id WHERE T2.event_details = 'Success' INTERSECT SELECT T1.service_type_code FROM services AS T1 JOIN EVENTS AS T2 ON T1.service_id = T2.service_id WHERE T2.event_details = 'Fail' | CREATE TABLE EVENTS (service_id VARCHAR(255), event_details VARCHAR(255)); CREATE TABLE services (service_type_code VARCHAR(255), service_id VARCHAR(255)) | generic | extra | extra | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 1 | 0 | {
"split": "train",
"row_index": 1302
} |
How many events did not have any participants? | SELECT COUNT(*) FROM EVENTS WHERE NOT event_id IN (SELECT event_id FROM Participants_in_Events) | CREATE TABLE EVENTS (event_id VARCHAR(255), event_name VARCHAR(255)); CREATE TABLE Participants_in_Events (event_id VARCHAR(255), participant_id VARCHAR(255)) | generic | extra | extra | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 1 | 1 | {
"split": "train",
"row_index": 1303
} |
What are all the distinct participant ids who attended any events? | SELECT COUNT(DISTINCT participant_id) FROM participants_in_Events | CREATE TABLE participants_in_Events (participant_id VARCHAR(255), event_id VARCHAR(255)) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 0 | 0 | 0 | {
"split": "train",
"row_index": 1304
} |
What is the name of the race held most recently? | SELECT name FROM races ORDER BY date DESC LIMIT 1 | CREATE TABLE races (name VARCHAR(255), date VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 0 | {
"split": "train",
"row_index": 1305
} |
What is the name and date of the most recent race? | SELECT name, date FROM races ORDER BY date DESC LIMIT 1 | CREATE TABLE races (name VARCHAR(255), date VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 1 | {
"split": "train",
"row_index": 1306
} |
Find the names of all races held in 2017. | SELECT name FROM races WHERE YEAR = 2017 | CREATE TABLE races (name VARCHAR(255), YEAR VARCHAR(255)) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 0 | {
"split": "train",
"row_index": 1307
} |
Find the distinct names of all races held between 2014 and 2017? | SELECT DISTINCT name FROM races WHERE YEAR BETWEEN 2014 AND 2017 | CREATE TABLE races (name VARCHAR(255), YEAR INTEGER) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 0 | {
"split": "train",
"row_index": 1308
} |
List the forename and surname of all distinct drivers who once had laptime less than 93000 milliseconds? | SELECT DISTINCT T1.forename, T1.surname FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid WHERE T2.milliseconds < 93000 | CREATE TABLE drivers (forename VARCHAR(255), surname VARCHAR(255), driverid VARCHAR(255)); CREATE TABLE laptimes (driverid VARCHAR(255), milliseconds INTEGER) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 1 | {
"split": "train",
"row_index": 1309
} |
Find all the distinct id and nationality of drivers who have had laptime more than 100000 milliseconds? | SELECT DISTINCT T1.driverid, T1.nationality FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid WHERE T2.milliseconds > 100000 | CREATE TABLE laptimes (driverid VARCHAR(255), milliseconds INTEGER); CREATE TABLE drivers (driverid VARCHAR(255), nationality VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 1 | {
"split": "train",
"row_index": 1310
} |
What are the forename and surname of the driver who has the smallest laptime? | SELECT T1.forename, T1.surname FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid ORDER BY T2.milliseconds LIMIT 1 | CREATE TABLE laptimes (driverid VARCHAR(255), milliseconds VARCHAR(255)); CREATE TABLE drivers (forename VARCHAR(255), surname VARCHAR(255), driverid VARCHAR(255)) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 3 | 0 | 1 | {
"split": "train",
"row_index": 1311
} |
What is the id and family name of the driver who has the longest laptime? | SELECT T1.driverid, T1.surname FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid ORDER BY T2.milliseconds DESC LIMIT 1 | CREATE TABLE drivers (driverid VARCHAR(255), surname VARCHAR(255)); CREATE TABLE laptimes (driverid VARCHAR(255), milliseconds VARCHAR(255)) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 3 | 0 | 1 | {
"split": "train",
"row_index": 1312
} |
How many drivers did not participate in the races held in 2009? | SELECT COUNT(DISTINCT driverId) FROM results WHERE NOT raceId IN (SELECT raceId FROM races WHERE YEAR <> 2009) | CREATE TABLE races (driverId VARCHAR(255), raceId VARCHAR(255), YEAR VARCHAR(255)); CREATE TABLE results (driverId VARCHAR(255), raceId VARCHAR(255), YEAR VARCHAR(255)) | generic | extra | extra | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 1 | 1 | {
"split": "train",
"row_index": 1315
} |
Give me a list of names and years of races that had any driver whose forename is Lewis? | SELECT T2.name, T2.year FROM results AS T1 JOIN races AS T2 ON T1.raceid = T2.raceid JOIN drivers AS T3 ON T1.driverid = T3.driverid WHERE T3.forename = 'Lewis' | CREATE TABLE drivers (driverid VARCHAR(255), forename VARCHAR(255)); CREATE TABLE races (name VARCHAR(255), year VARCHAR(255), raceid VARCHAR(255)); CREATE TABLE results (raceid VARCHAR(255), driverid VARCHAR(255)) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 3 | 0 | 1 | {
"split": "train",
"row_index": 1316
} |
Find the forename and surname of drivers whose nationality is German? | SELECT forename, surname FROM drivers WHERE nationality = 'German' | CREATE TABLE drivers (forename VARCHAR(255), surname VARCHAR(255), nationality VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 1 | {
"split": "train",
"row_index": 1317
} |
Find the id and forenames of drivers who participated both the races with name Australian Grand Prix and the races with name Chinese Grand Prix? | SELECT T2.driverid, T3.forename FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid JOIN drivers AS T3 ON T2.driverid = T3.driverid WHERE T1.name = 'Australian Grand Prix' INTERSECT SELECT T2.driverid, T3.forename FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid JOIN drivers AS T3 ON T2.driverid = ... | CREATE TABLE races (raceid VARCHAR(255), name VARCHAR(255)); CREATE TABLE results (driverid VARCHAR(255), raceid VARCHAR(255)); CREATE TABLE drivers (forename VARCHAR(255), driverid VARCHAR(255)) | generic | extra | extra | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 3 | 1 | 1 | {
"split": "train",
"row_index": 1318
} |
What are the forenames and surnames of drivers who participated in the races named Australian Grand Prix but not the races named Chinese Grand Prix? | SELECT T3.forename, T3.surname FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid JOIN drivers AS T3 ON T2.driverid = T3.driverid WHERE T1.name = 'Australian Grand Prix' EXCEPT SELECT T3.forename, T3.surname FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid JOIN drivers AS T3 ON T2.driverid = T3.dr... | CREATE TABLE races (raceid VARCHAR(255), name VARCHAR(255)); CREATE TABLE drivers (forename VARCHAR(255), surname VARCHAR(255), driverid VARCHAR(255)); CREATE TABLE results (raceid VARCHAR(255), driverid VARCHAR(255)) | generic | extra | extra | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 3 | 1 | 1 | {
"split": "train",
"row_index": 1319
} |
Find all the forenames of distinct drivers who was in position 1 as standing and won? | SELECT DISTINCT T1.forename FROM drivers AS T1 JOIN driverstandings AS T2 ON T1.driverid = T2.driverid WHERE T2.position = 1 AND T2.wins = 1 | CREATE TABLE driverstandings (driverid VARCHAR(255), position VARCHAR(255), wins VARCHAR(255)); CREATE TABLE drivers (forename VARCHAR(255), driverid VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 1 | {
"split": "train",
"row_index": 1320
} |
Find all the forenames of distinct drivers who won in position 1 as driver standing and had more than 20 points? | SELECT DISTINCT T1.forename FROM drivers AS T1 JOIN driverstandings AS T2 ON T1.driverid = T2.driverid WHERE T2.position = 1 AND T2.wins = 1 AND T2.points > 20 | CREATE TABLE drivers (forename VARCHAR(255), driverid VARCHAR(255)); CREATE TABLE driverstandings (driverid VARCHAR(255), points VARCHAR(255), position VARCHAR(255), wins VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 1 | {
"split": "train",
"row_index": 1321
} |
What are the numbers of constructors for different nationalities? | SELECT COUNT(*), nationality FROM constructors GROUP BY nationality | CREATE TABLE constructors (nationality VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 1 | {
"split": "train",
"row_index": 1322
} |
What are the numbers of races for each constructor id? | SELECT COUNT(*), constructorid FROM constructorStandings GROUP BY constructorid | CREATE TABLE constructorStandings (constructorid VARCHAR(255), points INTEGER) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 1 | {
"split": "train",
"row_index": 1323
} |
What are the names of races that were held after 2017 and the circuits were in the country of Spain? | SELECT T1.name FROM races AS T1 JOIN circuits AS T2 ON T1.circuitid = T2.circuitid WHERE T2.country = 'Spain' AND T1.year > 2017 | CREATE TABLE races (name VARCHAR(255), circuitid VARCHAR(255), year VARCHAR(255)); CREATE TABLE circuits (circuitid VARCHAR(255), country VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 1 | {
"split": "train",
"row_index": 1324
} |
List the forenames of all distinct drivers in alphabetical order? | SELECT DISTINCT forename FROM drivers ORDER BY forename | CREATE TABLE drivers (forename VARCHAR, id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 0 | {
"split": "train",
"row_index": 1328
} |
List the names of all distinct races in reversed lexicographic order? | SELECT DISTINCT name FROM races ORDER BY name DESC | CREATE TABLE races (name VARCHAR, id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 0 | {
"split": "train",
"row_index": 1329
} |
What are the names of races held between 2009 and 2011? | SELECT name FROM races WHERE YEAR BETWEEN 2009 AND 2011 | CREATE TABLE races (name VARCHAR, YEAR INTEGER, id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 0 | {
"split": "train",
"row_index": 1330
} |
What are the names of races held after 12:00:00 or before 09:00:00? | SELECT name FROM races WHERE TIME > '12:00:00' OR TIME < '09:00:00' | CREATE TABLE races (name VARCHAR, TIME VARCHAR, id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 1 | {
"split": "train",
"row_index": 1331
} |
What are the drivers' first, last names and id who had more than 8 pit stops or participated in more than 5 race results? | SELECT T1.forename, T1.surname, T1.driverid FROM drivers AS T1 JOIN pitstops AS T2 ON T1.driverid = T2.driverid GROUP BY T1.driverid HAVING COUNT(*) > 8 UNION SELECT T1.forename, T1.surname, T1.driverid FROM drivers AS T1 JOIN results AS T2 ON T1.driverid = T2.driverid GROUP BY T1.driverid HAVING COUNT(*) > 5 | CREATE TABLE drivers (forename VARCHAR, surname VARCHAR, driverid VARCHAR); CREATE TABLE results (driverid VARCHAR, id INTEGER PRIMARY KEY AUTO_INCREMENT); CREATE TABLE pitstops (driverid VARCHAR, id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | extra | extra | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 1 | 1 | {
"split": "train",
"row_index": 1332
} |
What are the drivers' last names and id who had 11 pit stops and participated in more than 5 race results? | SELECT T1.surname, T1.driverid FROM drivers AS T1 JOIN pitstops AS T2 ON T1.driverid = T2.driverid GROUP BY T1.driverid HAVING COUNT(*) = 11 INTERSECT SELECT T1.surname, T1.driverid FROM drivers AS T1 JOIN results AS T2 ON T1.driverid = T2.driverid GROUP BY T1.driverid HAVING COUNT(*) > 5 | CREATE TABLE drivers (surname VARCHAR, driverid VARCHAR); CREATE TABLE results (driverid VARCHAR, id INTEGER PRIMARY KEY AUTO_INCREMENT); CREATE TABLE pitstops (driverid VARCHAR, id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | extra | extra | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 1 | 1 | {
"split": "train",
"row_index": 1333
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.