messages
list |
---|
[
{
"content": "What are the first names of all the different drivers in alphabetical order?",
"role": "user"
},
{
"content": "SELECT DISTINCT forename FROM drivers ORDER BY forename ASC",
"role": "assistant"
}
]
|
[
{
"content": "List the names of all distinct races in reversed lexicographic order?",
"role": "user"
},
{
"content": "SELECT DISTINCT name FROM races ORDER BY name DESC",
"role": "assistant"
}
]
|
[
{
"content": "What are the different names of all the races in reverse alphabetical order?",
"role": "user"
},
{
"content": "SELECT DISTINCT name FROM races ORDER BY name DESC",
"role": "assistant"
}
]
|
[
{
"content": "What are the names of races held between 2009 and 2011?",
"role": "user"
},
{
"content": "SELECT name FROM races WHERE YEAR BETWEEN 2009 AND 2011",
"role": "assistant"
}
]
|
[
{
"content": "What are the names of all races held between 2009 and 2011?",
"role": "user"
},
{
"content": "SELECT name FROM races WHERE YEAR BETWEEN 2009 AND 2011",
"role": "assistant"
}
]
|
[
{
"content": "What are the names of races held after 12:00:00 or before 09:00:00?",
"role": "user"
},
{
"content": "SELECT name FROM races WHERE TIME > \"12:00:00\" OR TIME < \"09:00:00\"",
"role": "assistant"
}
]
|
[
{
"content": "What are the names of all races that occurred after 12:00:00 or before 09:00:00?",
"role": "user"
},
{
"content": "SELECT name FROM races WHERE TIME > \"12:00:00\" OR TIME < \"09:00:00\"",
"role": "assistant"
}
]
|
[
{
"content": "What are the drivers' first, last names and id who had more than 8 pit stops or participated in more than 5 race results?",
"role": "user"
},
{
"content": "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",
"role": "assistant"
}
]
|
[
{
"content": "What are the drivers' first names,last names, and ids for all those that had more than 8 stops or participated in more than 5 races?",
"role": "user"
},
{
"content": "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",
"role": "assistant"
}
]
|
[
{
"content": "What are the drivers' last names and id who had 11 pit stops and participated in more than 5 race results?",
"role": "user"
},
{
"content": "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",
"role": "assistant"
}
]
|
[
{
"content": "What are the last names and ids of all drivers who had 11 pit stops and participated in more than 5 races?",
"role": "user"
},
{
"content": "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",
"role": "assistant"
}
]
|
[
{
"content": "What is the id and last name of the driver who participated in the most races after 2010?",
"role": "user"
},
{
"content": "SELECT T1.driverid , T1.surname FROM drivers AS T1 JOIN results AS T2 ON T1.driverid = T2.driverid JOIN races AS T3 ON T2.raceid = T3.raceid WHERE T3.year > 2010 GROUP BY T1.driverid ORDER BY count(*) DESC LIMIT 1",
"role": "assistant"
}
]
|
[
{
"content": "What is the id and last name of the driver who participated in the most races after 2010?",
"role": "user"
},
{
"content": "SELECT T1.driverid , T1.surname FROM drivers AS T1 JOIN results AS T2 ON T1.driverid = T2.driverid JOIN races AS T3 ON T2.raceid = T3.raceid WHERE T3.year > 2010 GROUP BY T1.driverid ORDER BY count(*) DESC LIMIT 1",
"role": "assistant"
}
]
|
[
{
"content": "What are the names of circuits that belong to UK or Malaysia?",
"role": "user"
},
{
"content": "SELECT name FROM circuits WHERE country = \"UK\" OR country = \"Malaysia\"",
"role": "assistant"
}
]
|
[
{
"content": "What are the names of all the circuits that are in the UK or Malaysia?",
"role": "user"
},
{
"content": "SELECT name FROM circuits WHERE country = \"UK\" OR country = \"Malaysia\"",
"role": "assistant"
}
]
|
[
{
"content": "Find the id and location of circuits that belong to France or Belgium?",
"role": "user"
},
{
"content": "SELECT circuitid , LOCATION FROM circuits WHERE country = \"France\" OR country = \"Belgium\"",
"role": "assistant"
}
]
|
[
{
"content": "What are the ids and locations of all circuits in France or Belgium?",
"role": "user"
},
{
"content": "SELECT circuitid , LOCATION FROM circuits WHERE country = \"France\" OR country = \"Belgium\"",
"role": "assistant"
}
]
|
[
{
"content": "Find the names of Japanese constructors that have once earned more than 5 points?",
"role": "user"
},
{
"content": "SELECT T1.name FROM constructors AS T1 JOIN constructorstandings AS T2 ON T1.constructorid = T2.constructorid WHERE T1.nationality = \"Japanese\" AND T2.points > 5",
"role": "assistant"
}
]
|
[
{
"content": "What are the names of all the Japanese constructors that have earned more than 5 points?",
"role": "user"
},
{
"content": "SELECT T1.name FROM constructors AS T1 JOIN constructorstandings AS T2 ON T1.constructorid = T2.constructorid WHERE T1.nationality = \"Japanese\" AND T2.points > 5",
"role": "assistant"
}
]
|
[
{
"content": "What is the average fastest lap speed in race named 'Monaco Grand Prix' in 2008 ?",
"role": "user"
},
{
"content": "SELECT avg(T2.fastestlapspeed) FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid WHERE T1.year = 2008 AND T1.name = \"Monaco Grand Prix\"",
"role": "assistant"
}
]
|
[
{
"content": "What is the average fastest lap speed for the Monaco Grand Prix in 2008?",
"role": "user"
},
{
"content": "SELECT avg(T2.fastestlapspeed) FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid WHERE T1.year = 2008 AND T1.name = \"Monaco Grand Prix\"",
"role": "assistant"
}
]
|
[
{
"content": "What is the maximum fastest lap speed in race named 'Monaco Grand Prix' in 2008 ?",
"role": "user"
},
{
"content": "SELECT max(T2.fastestlapspeed) FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid WHERE T1.year = 2008 AND T1.name = \"Monaco Grand Prix\"",
"role": "assistant"
}
]
|
[
{
"content": "What is the maximum fastest lap speed in the Monaco Grand Prix in 2008?",
"role": "user"
},
{
"content": "SELECT max(T2.fastestlapspeed) FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid WHERE T1.year = 2008 AND T1.name = \"Monaco Grand Prix\"",
"role": "assistant"
}
]
|
[
{
"content": "What are the maximum fastest lap speed in races held after 2004 grouped by race name and ordered by year?",
"role": "user"
},
{
"content": "SELECT max(T2.fastestlapspeed) , T1.name , T1.year FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid WHERE T1.year > 2014 GROUP BY T1.name ORDER BY T1.year",
"role": "assistant"
}
]
|
[
{
"content": "For each race name, What is the maximum fastest lap speed for races after 2004 ordered by year?",
"role": "user"
},
{
"content": "SELECT max(T2.fastestlapspeed) , T1.name , T1.year FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid WHERE T1.year > 2014 GROUP BY T1.name ORDER BY T1.year",
"role": "assistant"
}
]
|
[
{
"content": "What are the average fastest lap speed in races held after 2004 grouped by race name and ordered by year?",
"role": "user"
},
{
"content": "SELECT avg(T2.fastestlapspeed) , T1.name , T1.year FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid WHERE T1.year > 2014 GROUP BY T1.name ORDER BY T1.year",
"role": "assistant"
}
]
|
[
{
"content": "What is the average fastest lap speed for races held after 2004, for each race, ordered by year?",
"role": "user"
},
{
"content": "SELECT avg(T2.fastestlapspeed) , T1.name , T1.year FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid WHERE T1.year > 2014 GROUP BY T1.name ORDER BY T1.year",
"role": "assistant"
}
]
|
[
{
"content": "Find the id, forename and number of races of all drivers who have at least participated in two races?",
"role": "user"
},
{
"content": "SELECT T1.driverid , T1.forename , count(*) FROM drivers AS T1 JOIN results AS T2 ON T1.driverid = T2.driverid JOIN races AS T3 ON T2.raceid = T3.raceid GROUP BY T1.driverid HAVING count(*) >= 2",
"role": "assistant"
}
]
|
[
{
"content": "What is the id, forename, and number of races for all drivers that have participated in at least 2 races?",
"role": "user"
},
{
"content": "SELECT T1.driverid , T1.forename , count(*) FROM drivers AS T1 JOIN results AS T2 ON T1.driverid = T2.driverid JOIN races AS T3 ON T2.raceid = T3.raceid GROUP BY T1.driverid HAVING count(*) >= 2",
"role": "assistant"
}
]
|
[
{
"content": "Find the driver id and number of races of all drivers who have at most participated in 30 races?",
"role": "user"
},
{
"content": "SELECT T1.driverid , count(*) FROM drivers AS T1 JOIN results AS T2 ON T1.driverid = T2.driverid JOIN races AS T3 ON T2.raceid = T3.raceid GROUP BY T1.driverid HAVING count(*) <= 30",
"role": "assistant"
}
]
|
[
{
"content": "For each id of a driver who participated in at most 30 races, how many races did they participate in?",
"role": "user"
},
{
"content": "SELECT T1.driverid , count(*) FROM drivers AS T1 JOIN results AS T2 ON T1.driverid = T2.driverid JOIN races AS T3 ON T2.raceid = T3.raceid GROUP BY T1.driverid HAVING count(*) <= 30",
"role": "assistant"
}
]
|
[
{
"content": "Find the id and surname of the driver who participated the most number of races?",
"role": "user"
},
{
"content": "SELECT T1.driverid , T1.surname FROM drivers AS T1 JOIN results AS T2 ON T1.driverid = T2.driverid JOIN races AS T3 ON T2.raceid = T3.raceid GROUP BY T1.driverid ORDER BY count(*) DESC LIMIT 1",
"role": "assistant"
}
]
|
[
{
"content": "What are the ids and last names of all drivers who participated in the most races?",
"role": "user"
},
{
"content": "SELECT T1.driverid , T1.surname FROM drivers AS T1 JOIN results AS T2 ON T1.driverid = T2.driverid JOIN races AS T3 ON T2.raceid = T3.raceid GROUP BY T1.driverid ORDER BY count(*) DESC LIMIT 1",
"role": "assistant"
}
]
|
[
{
"content": "How many technicians are there?",
"role": "user"
},
{
"content": "SELECT count(*) FROM technician",
"role": "assistant"
}
]
|
[
{
"content": "What is the number of technicians?",
"role": "user"
},
{
"content": "SELECT count(*) FROM technician",
"role": "assistant"
}
]
|
[
{
"content": "List the names of technicians in ascending order of age.",
"role": "user"
},
{
"content": "SELECT Name FROM technician ORDER BY Age ASC",
"role": "assistant"
}
]
|
[
{
"content": "What are the names of the technicians by ascending order of age?",
"role": "user"
},
{
"content": "SELECT Name FROM technician ORDER BY Age ASC",
"role": "assistant"
}
]
|
[
{
"content": "What are the team and starting year of technicians?",
"role": "user"
},
{
"content": "SELECT Team , Starting_Year FROM technician",
"role": "assistant"
}
]
|
[
{
"content": "What is the team and starting year for each technician?",
"role": "user"
},
{
"content": "SELECT Team , Starting_Year FROM technician",
"role": "assistant"
}
]
|
[
{
"content": "List the name of technicians whose team is not \"NYY\".",
"role": "user"
},
{
"content": "SELECT Name FROM technician WHERE Team != \"NYY\"",
"role": "assistant"
}
]
|
[
{
"content": "What is the name of the technician whose team is not 'NYY'?",
"role": "user"
},
{
"content": "SELECT Name FROM technician WHERE Team != \"NYY\"",
"role": "assistant"
}
]
|
[
{
"content": "Show the name of technicians aged either 36 or 37",
"role": "user"
},
{
"content": "SELECT Name FROM technician WHERE Age = 36 OR Age = 37",
"role": "assistant"
}
]
|
[
{
"content": "What are the names of the technicians aged either 36 or 37?",
"role": "user"
},
{
"content": "SELECT Name FROM technician WHERE Age = 36 OR Age = 37",
"role": "assistant"
}
]
|
[
{
"content": "What is the starting year of the oldest technicians?",
"role": "user"
},
{
"content": "SELECT Starting_Year FROM technician ORDER BY Age DESC LIMIT 1",
"role": "assistant"
}
]
|
[
{
"content": "What is the starting year for the oldest technician?",
"role": "user"
},
{
"content": "SELECT Starting_Year FROM technician ORDER BY Age DESC LIMIT 1",
"role": "assistant"
}
]
|
[
{
"content": "Show different teams of technicians and the number of technicians in each team.",
"role": "user"
},
{
"content": "SELECT Team , COUNT(*) FROM technician GROUP BY Team",
"role": "assistant"
}
]
|
[
{
"content": "For each team, how many technicians are there?",
"role": "user"
},
{
"content": "SELECT Team , COUNT(*) FROM technician GROUP BY Team",
"role": "assistant"
}
]
|
[
{
"content": "Please show the team that has the most number of technicians.",
"role": "user"
},
{
"content": "SELECT Team FROM technician GROUP BY Team ORDER BY COUNT(*) DESC LIMIT 1",
"role": "assistant"
}
]
|
[
{
"content": "What are the teams with the most technicians?",
"role": "user"
},
{
"content": "SELECT Team FROM technician GROUP BY Team ORDER BY COUNT(*) DESC LIMIT 1",
"role": "assistant"
}
]
|
[
{
"content": "Show the team that have at least two technicians.",
"role": "user"
},
{
"content": "SELECT Team FROM technician GROUP BY Team HAVING COUNT(*) >= 2",
"role": "assistant"
}
]
|
[
{
"content": "What is the team with at least 2 technicians?",
"role": "user"
},
{
"content": "SELECT Team FROM technician GROUP BY Team HAVING COUNT(*) >= 2",
"role": "assistant"
}
]
|
[
{
"content": "Show names of technicians and series of machines they are assigned to repair.",
"role": "user"
},
{
"content": "SELECT T3.Name , T2.Machine_series FROM repair_assignment AS T1 JOIN machine AS T2 ON T1.machine_id = T2.machine_id JOIN technician AS T3 ON T1.technician_ID = T3.technician_ID",
"role": "assistant"
}
]
|
[
{
"content": "What are the names of technicians and the machine series that they repair?",
"role": "user"
},
{
"content": "SELECT T3.Name , T2.Machine_series FROM repair_assignment AS T1 JOIN machine AS T2 ON T1.machine_id = T2.machine_id JOIN technician AS T3 ON T1.technician_ID = T3.technician_ID",
"role": "assistant"
}
]
|
[
{
"content": "Show names of technicians in ascending order of quality rank of the machine they are assigned.",
"role": "user"
},
{
"content": "SELECT T3.Name FROM repair_assignment AS T1 JOIN machine AS T2 ON T1.machine_id = T2.machine_id JOIN technician AS T3 ON T1.technician_ID = T3.technician_ID ORDER BY T2.quality_rank",
"role": "assistant"
}
]
|
[
{
"content": "What are the names of the technicians by ascending order of quality rank for the machine they are assigned?",
"role": "user"
},
{
"content": "SELECT T3.Name FROM repair_assignment AS T1 JOIN machine AS T2 ON T1.machine_id = T2.machine_id JOIN technician AS T3 ON T1.technician_ID = T3.technician_ID ORDER BY T2.quality_rank",
"role": "assistant"
}
]
|
[
{
"content": "Show names of technicians who are assigned to repair machines with value point more than 70.",
"role": "user"
},
{
"content": "SELECT T3.Name FROM repair_assignment AS T1 JOIN machine AS T2 ON T1.machine_id = T2.machine_id JOIN technician AS T3 ON T1.technician_ID = T3.technician_ID WHERE T2.value_points > 70",
"role": "assistant"
}
]
|
[
{
"content": "What are the names of the technicians that are assigned to repair machines with more point values than 70?",
"role": "user"
},
{
"content": "SELECT T3.Name FROM repair_assignment AS T1 JOIN machine AS T2 ON T1.machine_id = T2.machine_id JOIN technician AS T3 ON T1.technician_ID = T3.technician_ID WHERE T2.value_points > 70",
"role": "assistant"
}
]
|
[
{
"content": "Show names of technicians and the number of machines they are assigned to repair.",
"role": "user"
},
{
"content": "SELECT T2.Name , COUNT(*) FROM repair_assignment AS T1 JOIN technician AS T2 ON T1.technician_ID = T2.technician_ID GROUP BY T2.Name",
"role": "assistant"
}
]
|
[
{
"content": "What are the names of the technicians and how many machines are they assigned to repair?",
"role": "user"
},
{
"content": "SELECT T2.Name , COUNT(*) FROM repair_assignment AS T1 JOIN technician AS T2 ON T1.technician_ID = T2.technician_ID GROUP BY T2.Name",
"role": "assistant"
}
]
|
[
{
"content": "List the names of technicians who have not been assigned to repair machines.",
"role": "user"
},
{
"content": "SELECT Name FROM technician WHERE technician_id NOT IN (SELECT technician_id FROM repair_assignment)",
"role": "assistant"
}
]
|
[
{
"content": "What are the names of the technicians that have not been assigned to repair machines?",
"role": "user"
},
{
"content": "SELECT Name FROM technician WHERE technician_id NOT IN (SELECT technician_id FROM repair_assignment)",
"role": "assistant"
}
]
|
[
{
"content": "Show the starting years shared by technicians from team \"CLE\" and \"CWS\".",
"role": "user"
},
{
"content": "SELECT Starting_Year FROM technician WHERE Team = \"CLE\" INTERSECT SELECT Starting_Year FROM technician WHERE Team = \"CWS\"",
"role": "assistant"
}
]
|
[
{
"content": "What are the starting years shared by the technicians from the team \"CLE\" or \"CWS\"?",
"role": "user"
},
{
"content": "SELECT Starting_Year FROM technician WHERE Team = \"CLE\" INTERSECT SELECT Starting_Year FROM technician WHERE Team = \"CWS\"",
"role": "assistant"
}
]
|
[
{
"content": "How many entrepreneurs are there?",
"role": "user"
},
{
"content": "SELECT count(*) FROM entrepreneur",
"role": "assistant"
}
]
|
[
{
"content": "Count the number of entrepreneurs.",
"role": "user"
},
{
"content": "SELECT count(*) FROM entrepreneur",
"role": "assistant"
}
]
|
[
{
"content": "List the companies of entrepreneurs in descending order of money requested.",
"role": "user"
},
{
"content": "SELECT Company FROM entrepreneur ORDER BY Money_Requested DESC",
"role": "assistant"
}
]
|
[
{
"content": "What are the companies of entrepreneurs, ordered descending by amount of money requested?",
"role": "user"
},
{
"content": "SELECT Company FROM entrepreneur ORDER BY Money_Requested DESC",
"role": "assistant"
}
]
|
[
{
"content": "List the companies and the investors of entrepreneurs.",
"role": "user"
},
{
"content": "SELECT Company , Investor FROM entrepreneur",
"role": "assistant"
}
]
|
[
{
"content": "What are the companies and investors that correspond to each entrepreneur?",
"role": "user"
},
{
"content": "SELECT Company , Investor FROM entrepreneur",
"role": "assistant"
}
]
|
[
{
"content": "What is the average money requested by all entrepreneurs?",
"role": "user"
},
{
"content": "SELECT avg(Money_Requested) FROM entrepreneur",
"role": "assistant"
}
]
|
[
{
"content": "Return the average money requested across all entrepreneurs.",
"role": "user"
},
{
"content": "SELECT avg(Money_Requested) FROM entrepreneur",
"role": "assistant"
}
]
|
[
{
"content": "What are the names of people in ascending order of weight?",
"role": "user"
},
{
"content": "SELECT Name FROM People ORDER BY Weight ASC",
"role": "assistant"
}
]
|
[
{
"content": "Return the names of people, ordered by weight ascending.",
"role": "user"
},
{
"content": "SELECT Name FROM People ORDER BY Weight ASC",
"role": "assistant"
}
]
|
[
{
"content": "What are the names of entrepreneurs?",
"role": "user"
},
{
"content": "SELECT T2.Name FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID",
"role": "assistant"
}
]
|
[
{
"content": "Return the names of entrepreneurs.",
"role": "user"
},
{
"content": "SELECT T2.Name FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID",
"role": "assistant"
}
]
|
[
{
"content": "What are the names of entrepreneurs whose investor is not \"Rachel Elnaugh\"?",
"role": "user"
},
{
"content": "SELECT T2.Name FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Investor != \"Rachel Elnaugh\"",
"role": "assistant"
}
]
|
[
{
"content": "Return the names of entrepreneurs do no not have the investor Rachel Elnaugh.",
"role": "user"
},
{
"content": "SELECT T2.Name FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Investor != \"Rachel Elnaugh\"",
"role": "assistant"
}
]
|
[
{
"content": "What is the weight of the shortest person?",
"role": "user"
},
{
"content": "SELECT Weight FROM people ORDER BY Height ASC LIMIT 1",
"role": "assistant"
}
]
|
[
{
"content": "Return the weight of the shortest person.",
"role": "user"
},
{
"content": "SELECT Weight FROM people ORDER BY Height ASC LIMIT 1",
"role": "assistant"
}
]
|
[
{
"content": "What is the name of the entrepreneur with the greatest weight?",
"role": "user"
},
{
"content": "SELECT T2.Name FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Weight DESC LIMIT 1",
"role": "assistant"
}
]
|
[
{
"content": "Return the name of the heaviest entrepreneur.",
"role": "user"
},
{
"content": "SELECT T2.Name FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Weight DESC LIMIT 1",
"role": "assistant"
}
]
|
[
{
"content": "What is the total money requested by entrepreneurs with height more than 1.85?",
"role": "user"
},
{
"content": "SELECT sum(T1.Money_Requested) FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T2.Height > 1.85",
"role": "assistant"
}
]
|
[
{
"content": "Give the total money requested by entrepreneurs who are taller than 1.85.",
"role": "user"
},
{
"content": "SELECT sum(T1.Money_Requested) FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T2.Height > 1.85",
"role": "assistant"
}
]
|
[
{
"content": "What are the dates of birth of entrepreneurs with investor \"Simon Woodroffe\" or \"Peter Jones\"?",
"role": "user"
},
{
"content": "SELECT T2.Date_of_Birth FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Investor = \"Simon Woodroffe\" OR T1.Investor = \"Peter Jones\"",
"role": "assistant"
}
]
|
[
{
"content": "Return the dates of birth for entrepreneurs who have either the investor Simon Woodroffe or Peter Jones.",
"role": "user"
},
{
"content": "SELECT T2.Date_of_Birth FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Investor = \"Simon Woodroffe\" OR T1.Investor = \"Peter Jones\"",
"role": "assistant"
}
]
|
[
{
"content": "What are the weights of entrepreneurs in descending order of money requested?",
"role": "user"
},
{
"content": "SELECT T2.Weight FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Money_Requested DESC",
"role": "assistant"
}
]
|
[
{
"content": "Return the weights of entrepreneurs, ordered descending by amount of money requested.",
"role": "user"
},
{
"content": "SELECT T2.Weight FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Money_Requested DESC",
"role": "assistant"
}
]
|
[
{
"content": "What are the investors of entrepreneurs and the corresponding number of entrepreneurs invested by each investor?",
"role": "user"
},
{
"content": "SELECT Investor , COUNT(*) FROM entrepreneur GROUP BY Investor",
"role": "assistant"
}
]
|
[
{
"content": "How many entrepreneurs correspond to each investor?",
"role": "user"
},
{
"content": "SELECT Investor , COUNT(*) FROM entrepreneur GROUP BY Investor",
"role": "assistant"
}
]
|
[
{
"content": "What is the investor that has invested in the most number of entrepreneurs?",
"role": "user"
},
{
"content": "SELECT Investor FROM entrepreneur GROUP BY Investor ORDER BY COUNT(*) DESC LIMIT 1",
"role": "assistant"
}
]
|
[
{
"content": "Return the investor who have invested in the greatest number of entrepreneurs.",
"role": "user"
},
{
"content": "SELECT Investor FROM entrepreneur GROUP BY Investor ORDER BY COUNT(*) DESC LIMIT 1",
"role": "assistant"
}
]
|
[
{
"content": "What are the investors that have invested in at least two entrepreneurs?",
"role": "user"
},
{
"content": "SELECT Investor FROM entrepreneur GROUP BY Investor HAVING COUNT(*) >= 2",
"role": "assistant"
}
]
|
[
{
"content": "Return the investors who have invested in two or more entrepreneurs.",
"role": "user"
},
{
"content": "SELECT Investor FROM entrepreneur GROUP BY Investor HAVING COUNT(*) >= 2",
"role": "assistant"
}
]
|
[
{
"content": "List the names of entrepreneurs and their companies in descending order of money requested?",
"role": "user"
},
{
"content": "SELECT T2.Name , T1.Company FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Money_Requested",
"role": "assistant"
}
]
|
[
{
"content": "What are the names of entrepreneurs and their corresponding investors, ordered descending by the amount of money requested?",
"role": "user"
},
{
"content": "SELECT T2.Name , T1.Company FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Money_Requested",
"role": "assistant"
}
]
|
[
{
"content": "List the names of people that are not entrepreneurs.",
"role": "user"
},
{
"content": "SELECT Name FROM people WHERE People_ID NOT IN (SELECT People_ID FROM entrepreneur)",
"role": "assistant"
}
]
|
[
{
"content": "What are the names of people who are not entrepreneurs?",
"role": "user"
},
{
"content": "SELECT Name FROM people WHERE People_ID NOT IN (SELECT People_ID FROM entrepreneur)",
"role": "assistant"
}
]
|
[
{
"content": "Show the investors shared by entrepreneurs that requested more than 140000 and entrepreneurs that requested less than 120000.",
"role": "user"
},
{
"content": "SELECT Investor FROM entrepreneur WHERE Money_Requested > 140000 INTERSECT SELECT Investor FROM entrepreneur WHERE Money_Requested < 120000",
"role": "assistant"
}
]
|
[
{
"content": "What are the investors who have invested in both entrepreneurs who requested more than 140000 and entrepreneurs who requested less than 120000?",
"role": "user"
},
{
"content": "SELECT Investor FROM entrepreneur WHERE Money_Requested > 140000 INTERSECT SELECT Investor FROM entrepreneur WHERE Money_Requested < 120000",
"role": "assistant"
}
]
|
[
{
"content": "How many distinct companies are there?",
"role": "user"
},
{
"content": "SELECT count(DISTINCT Company) FROM entrepreneur",
"role": "assistant"
}
]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.