input
stringlengths
191
7.13k
output
stringlengths
19
578
Tables: circuits, races, drivers, status, seasons, constructors, constructorStandings, results, driverStandings, constructorResults, qualifying, pitStops, lapTimes Columns: circuits.circuitId, circuits.circuitRef, circuits.name, circuits.location, circuits.country, circuits.lat, circuits.lng, circuits.alt, circuits.url...
SELECT DISTINCT forename FROM drivers ORDER BY forename ASC;
Tables: circuits, races, drivers, status, seasons, constructors, constructorStandings, results, driverStandings, constructorResults, qualifying, pitStops, lapTimes Columns: circuits.circuitId, circuits.circuitRef, circuits.name, circuits.location, circuits.country, circuits.lat, circuits.lng, circuits.alt, circuits.url...
SELECT DISTINCT name FROM races ORDER BY name DESC;
Tables: circuits, races, drivers, status, seasons, constructors, constructorStandings, results, driverStandings, constructorResults, qualifying, pitStops, lapTimes Columns: circuits.circuitId, circuits.circuitRef, circuits.name, circuits.location, circuits.country, circuits.lat, circuits.lng, circuits.alt, circuits.url...
SELECT DISTINCT name FROM races ORDER BY name DESC;
Tables: circuits, races, drivers, status, seasons, constructors, constructorStandings, results, driverStandings, constructorResults, qualifying, pitStops, lapTimes Columns: circuits.circuitId, circuits.circuitRef, circuits.name, circuits.location, circuits.country, circuits.lat, circuits.lng, circuits.alt, circuits.url...
SELECT name FROM races WHERE YEAR BETWEEN 2009 AND 2011;
Tables: circuits, races, drivers, status, seasons, constructors, constructorStandings, results, driverStandings, constructorResults, qualifying, pitStops, lapTimes Columns: circuits.circuitId, circuits.circuitRef, circuits.name, circuits.location, circuits.country, circuits.lat, circuits.lng, circuits.alt, circuits.url...
SELECT name FROM races WHERE YEAR BETWEEN 2009 AND 2011;
Tables: circuits, races, drivers, status, seasons, constructors, constructorStandings, results, driverStandings, constructorResults, qualifying, pitStops, lapTimes Columns: circuits.circuitId, circuits.circuitRef, circuits.name, circuits.location, circuits.country, circuits.lat, circuits.lng, circuits.alt, circuits.url...
SELECT name FROM races WHERE TIME > "12:00:00" OR TIME < "09:00:00";
Tables: circuits, races, drivers, status, seasons, constructors, constructorStandings, results, driverStandings, constructorResults, qualifying, pitStops, lapTimes Columns: circuits.circuitId, circuits.circuitRef, circuits.name, circuits.location, circuits.country, circuits.lat, circuits.lng, circuits.alt, circuits.url...
SELECT name FROM races WHERE TIME > "12:00:00" OR TIME < "09:00:00";
Tables: circuits, races, drivers, status, seasons, constructors, constructorStandings, results, driverStandings, constructorResults, qualifying, pitStops, lapTimes Columns: circuits.circuitId, circuits.circuitRef, circuits.name, circuits.location, circuits.country, circuits.lat, circuits.lng, circuits.alt, circuits.url...
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(*)...
Tables: circuits, races, drivers, status, seasons, constructors, constructorStandings, results, driverStandings, constructorResults, qualifying, pitStops, lapTimes Columns: circuits.circuitId, circuits.circuitRef, circuits.name, circuits.location, circuits.country, circuits.lat, circuits.lng, circuits.alt, circuits.url...
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(*)...
Tables: circuits, races, drivers, status, seasons, constructors, constructorStandings, results, driverStandings, constructorResults, qualifying, pitStops, lapTimes Columns: circuits.circuitId, circuits.circuitRef, circuits.name, circuits.location, circuits.country, circuits.lat, circuits.lng, circuits.alt, circuits.url...
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;
Tables: circuits, races, drivers, status, seasons, constructors, constructorStandings, results, driverStandings, constructorResults, qualifying, pitStops, lapTimes Columns: circuits.circuitId, circuits.circuitRef, circuits.name, circuits.location, circuits.country, circuits.lat, circuits.lng, circuits.alt, circuits.url...
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;
Tables: circuits, races, drivers, status, seasons, constructors, constructorStandings, results, driverStandings, constructorResults, qualifying, pitStops, lapTimes Columns: circuits.circuitId, circuits.circuitRef, circuits.name, circuits.location, circuits.country, circuits.lat, circuits.lng, circuits.alt, circuits.url...
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;
Tables: circuits, races, drivers, status, seasons, constructors, constructorStandings, results, driverStandings, constructorResults, qualifying, pitStops, lapTimes Columns: circuits.circuitId, circuits.circuitRef, circuits.name, circuits.location, circuits.country, circuits.lat, circuits.lng, circuits.alt, circuits.url...
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;
Tables: circuits, races, drivers, status, seasons, constructors, constructorStandings, results, driverStandings, constructorResults, qualifying, pitStops, lapTimes Columns: circuits.circuitId, circuits.circuitRef, circuits.name, circuits.location, circuits.country, circuits.lat, circuits.lng, circuits.alt, circuits.url...
SELECT name FROM circuits WHERE country = "UK" OR country = "Malaysia";
Tables: circuits, races, drivers, status, seasons, constructors, constructorStandings, results, driverStandings, constructorResults, qualifying, pitStops, lapTimes Columns: circuits.circuitId, circuits.circuitRef, circuits.name, circuits.location, circuits.country, circuits.lat, circuits.lng, circuits.alt, circuits.url...
SELECT name FROM circuits WHERE country = "UK" OR country = "Malaysia";
Tables: circuits, races, drivers, status, seasons, constructors, constructorStandings, results, driverStandings, constructorResults, qualifying, pitStops, lapTimes Columns: circuits.circuitId, circuits.circuitRef, circuits.name, circuits.location, circuits.country, circuits.lat, circuits.lng, circuits.alt, circuits.url...
SELECT circuitid , LOCATION FROM circuits WHERE country = "France" OR country = "Belgium";
Tables: circuits, races, drivers, status, seasons, constructors, constructorStandings, results, driverStandings, constructorResults, qualifying, pitStops, lapTimes Columns: circuits.circuitId, circuits.circuitRef, circuits.name, circuits.location, circuits.country, circuits.lat, circuits.lng, circuits.alt, circuits.url...
SELECT circuitid , LOCATION FROM circuits WHERE country = "France" OR country = "Belgium";
Tables: circuits, races, drivers, status, seasons, constructors, constructorStandings, results, driverStandings, constructorResults, qualifying, pitStops, lapTimes Columns: circuits.circuitId, circuits.circuitRef, circuits.name, circuits.location, circuits.country, circuits.lat, circuits.lng, circuits.alt, circuits.url...
SELECT T1.name FROM constructors AS T1 JOIN constructorstandings AS T2 ON T1.constructorid = T2.constructorid WHERE T1.nationality = "Japanese" AND T2.points > 5;
Tables: circuits, races, drivers, status, seasons, constructors, constructorStandings, results, driverStandings, constructorResults, qualifying, pitStops, lapTimes Columns: circuits.circuitId, circuits.circuitRef, circuits.name, circuits.location, circuits.country, circuits.lat, circuits.lng, circuits.alt, circuits.url...
SELECT T1.name FROM constructors AS T1 JOIN constructorstandings AS T2 ON T1.constructorid = T2.constructorid WHERE T1.nationality = "Japanese" AND T2.points > 5;
Tables: circuits, races, drivers, status, seasons, constructors, constructorStandings, results, driverStandings, constructorResults, qualifying, pitStops, lapTimes Columns: circuits.circuitId, circuits.circuitRef, circuits.name, circuits.location, circuits.country, circuits.lat, circuits.lng, circuits.alt, circuits.url...
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";
Tables: circuits, races, drivers, status, seasons, constructors, constructorStandings, results, driverStandings, constructorResults, qualifying, pitStops, lapTimes Columns: circuits.circuitId, circuits.circuitRef, circuits.name, circuits.location, circuits.country, circuits.lat, circuits.lng, circuits.alt, circuits.url...
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";
Tables: circuits, races, drivers, status, seasons, constructors, constructorStandings, results, driverStandings, constructorResults, qualifying, pitStops, lapTimes Columns: circuits.circuitId, circuits.circuitRef, circuits.name, circuits.location, circuits.country, circuits.lat, circuits.lng, circuits.alt, circuits.url...
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";
Tables: circuits, races, drivers, status, seasons, constructors, constructorStandings, results, driverStandings, constructorResults, qualifying, pitStops, lapTimes Columns: circuits.circuitId, circuits.circuitRef, circuits.name, circuits.location, circuits.country, circuits.lat, circuits.lng, circuits.alt, circuits.url...
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";
Tables: circuits, races, drivers, status, seasons, constructors, constructorStandings, results, driverStandings, constructorResults, qualifying, pitStops, lapTimes Columns: circuits.circuitId, circuits.circuitRef, circuits.name, circuits.location, circuits.country, circuits.lat, circuits.lng, circuits.alt, circuits.url...
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;
Tables: circuits, races, drivers, status, seasons, constructors, constructorStandings, results, driverStandings, constructorResults, qualifying, pitStops, lapTimes Columns: circuits.circuitId, circuits.circuitRef, circuits.name, circuits.location, circuits.country, circuits.lat, circuits.lng, circuits.alt, circuits.url...
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;
Tables: circuits, races, drivers, status, seasons, constructors, constructorStandings, results, driverStandings, constructorResults, qualifying, pitStops, lapTimes Columns: circuits.circuitId, circuits.circuitRef, circuits.name, circuits.location, circuits.country, circuits.lat, circuits.lng, circuits.alt, circuits.url...
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;
Tables: circuits, races, drivers, status, seasons, constructors, constructorStandings, results, driverStandings, constructorResults, qualifying, pitStops, lapTimes Columns: circuits.circuitId, circuits.circuitRef, circuits.name, circuits.location, circuits.country, circuits.lat, circuits.lng, circuits.alt, circuits.url...
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;
Tables: circuits, races, drivers, status, seasons, constructors, constructorStandings, results, driverStandings, constructorResults, qualifying, pitStops, lapTimes Columns: circuits.circuitId, circuits.circuitRef, circuits.name, circuits.location, circuits.country, circuits.lat, circuits.lng, circuits.alt, circuits.url...
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;
Tables: circuits, races, drivers, status, seasons, constructors, constructorStandings, results, driverStandings, constructorResults, qualifying, pitStops, lapTimes Columns: circuits.circuitId, circuits.circuitRef, circuits.name, circuits.location, circuits.country, circuits.lat, circuits.lng, circuits.alt, circuits.url...
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;
Tables: circuits, races, drivers, status, seasons, constructors, constructorStandings, results, driverStandings, constructorResults, qualifying, pitStops, lapTimes Columns: circuits.circuitId, circuits.circuitRef, circuits.name, circuits.location, circuits.country, circuits.lat, circuits.lng, circuits.alt, circuits.url...
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;
Tables: circuits, races, drivers, status, seasons, constructors, constructorStandings, results, driverStandings, constructorResults, qualifying, pitStops, lapTimes Columns: circuits.circuitId, circuits.circuitRef, circuits.name, circuits.location, circuits.country, circuits.lat, circuits.lng, circuits.alt, circuits.url...
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;
Tables: circuits, races, drivers, status, seasons, constructors, constructorStandings, results, driverStandings, constructorResults, qualifying, pitStops, lapTimes Columns: circuits.circuitId, circuits.circuitRef, circuits.name, circuits.location, circuits.country, circuits.lat, circuits.lng, circuits.alt, circuits.url...
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;
Tables: circuits, races, drivers, status, seasons, constructors, constructorStandings, results, driverStandings, constructorResults, qualifying, pitStops, lapTimes Columns: circuits.circuitId, circuits.circuitRef, circuits.name, circuits.location, circuits.country, circuits.lat, circuits.lng, circuits.alt, circuits.url...
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;
Tables: repair, machine, technician, repair_assignment Columns: repair.repair_ID, repair.name, repair.Launch_Date, repair.Notes, machine.Machine_ID, machine.Making_Year, machine.Class, machine.Team, machine.Machine_series, machine.value_points, machine.quality_rank, technician.technician_id, technician.Name, technician...
SELECT count(*) FROM technician;
Tables: repair, machine, technician, repair_assignment Columns: repair.repair_ID, repair.name, repair.Launch_Date, repair.Notes, machine.Machine_ID, machine.Making_Year, machine.Class, machine.Team, machine.Machine_series, machine.value_points, machine.quality_rank, technician.technician_id, technician.Name, technician...
SELECT count(*) FROM technician;
Tables: repair, machine, technician, repair_assignment Columns: repair.repair_ID, repair.name, repair.Launch_Date, repair.Notes, machine.Machine_ID, machine.Making_Year, machine.Class, machine.Team, machine.Machine_series, machine.value_points, machine.quality_rank, technician.technician_id, technician.Name, technician...
SELECT Name FROM technician ORDER BY Age ASC;
Tables: repair, machine, technician, repair_assignment Columns: repair.repair_ID, repair.name, repair.Launch_Date, repair.Notes, machine.Machine_ID, machine.Making_Year, machine.Class, machine.Team, machine.Machine_series, machine.value_points, machine.quality_rank, technician.technician_id, technician.Name, technician...
SELECT Name FROM technician ORDER BY Age ASC;
Tables: repair, machine, technician, repair_assignment Columns: repair.repair_ID, repair.name, repair.Launch_Date, repair.Notes, machine.Machine_ID, machine.Making_Year, machine.Class, machine.Team, machine.Machine_series, machine.value_points, machine.quality_rank, technician.technician_id, technician.Name, technician...
SELECT Team , Starting_Year FROM technician;
Tables: repair, machine, technician, repair_assignment Columns: repair.repair_ID, repair.name, repair.Launch_Date, repair.Notes, machine.Machine_ID, machine.Making_Year, machine.Class, machine.Team, machine.Machine_series, machine.value_points, machine.quality_rank, technician.technician_id, technician.Name, technician...
SELECT Team , Starting_Year FROM technician;
Tables: repair, machine, technician, repair_assignment Columns: repair.repair_ID, repair.name, repair.Launch_Date, repair.Notes, machine.Machine_ID, machine.Making_Year, machine.Class, machine.Team, machine.Machine_series, machine.value_points, machine.quality_rank, technician.technician_id, technician.Name, technician...
SELECT Name FROM technician WHERE Team != "NYY";
Tables: repair, machine, technician, repair_assignment Columns: repair.repair_ID, repair.name, repair.Launch_Date, repair.Notes, machine.Machine_ID, machine.Making_Year, machine.Class, machine.Team, machine.Machine_series, machine.value_points, machine.quality_rank, technician.technician_id, technician.Name, technician...
SELECT Name FROM technician WHERE Team != "NYY";
Tables: repair, machine, technician, repair_assignment Columns: repair.repair_ID, repair.name, repair.Launch_Date, repair.Notes, machine.Machine_ID, machine.Making_Year, machine.Class, machine.Team, machine.Machine_series, machine.value_points, machine.quality_rank, technician.technician_id, technician.Name, technician...
SELECT Name FROM technician WHERE Age = 36 OR Age = 37;
Tables: repair, machine, technician, repair_assignment Columns: repair.repair_ID, repair.name, repair.Launch_Date, repair.Notes, machine.Machine_ID, machine.Making_Year, machine.Class, machine.Team, machine.Machine_series, machine.value_points, machine.quality_rank, technician.technician_id, technician.Name, technician...
SELECT Name FROM technician WHERE Age = 36 OR Age = 37;
Tables: repair, machine, technician, repair_assignment Columns: repair.repair_ID, repair.name, repair.Launch_Date, repair.Notes, machine.Machine_ID, machine.Making_Year, machine.Class, machine.Team, machine.Machine_series, machine.value_points, machine.quality_rank, technician.technician_id, technician.Name, technician...
SELECT Starting_Year FROM technician ORDER BY Age DESC LIMIT 1;
Tables: repair, machine, technician, repair_assignment Columns: repair.repair_ID, repair.name, repair.Launch_Date, repair.Notes, machine.Machine_ID, machine.Making_Year, machine.Class, machine.Team, machine.Machine_series, machine.value_points, machine.quality_rank, technician.technician_id, technician.Name, technician...
SELECT Starting_Year FROM technician ORDER BY Age DESC LIMIT 1;
Tables: repair, machine, technician, repair_assignment Columns: repair.repair_ID, repair.name, repair.Launch_Date, repair.Notes, machine.Machine_ID, machine.Making_Year, machine.Class, machine.Team, machine.Machine_series, machine.value_points, machine.quality_rank, technician.technician_id, technician.Name, technician...
SELECT Team , COUNT(*) FROM technician GROUP BY Team;
Tables: repair, machine, technician, repair_assignment Columns: repair.repair_ID, repair.name, repair.Launch_Date, repair.Notes, machine.Machine_ID, machine.Making_Year, machine.Class, machine.Team, machine.Machine_series, machine.value_points, machine.quality_rank, technician.technician_id, technician.Name, technician...
SELECT Team , COUNT(*) FROM technician GROUP BY Team;
Tables: repair, machine, technician, repair_assignment Columns: repair.repair_ID, repair.name, repair.Launch_Date, repair.Notes, machine.Machine_ID, machine.Making_Year, machine.Class, machine.Team, machine.Machine_series, machine.value_points, machine.quality_rank, technician.technician_id, technician.Name, technician...
SELECT Team FROM technician GROUP BY Team ORDER BY COUNT(*) DESC LIMIT 1;
Tables: repair, machine, technician, repair_assignment Columns: repair.repair_ID, repair.name, repair.Launch_Date, repair.Notes, machine.Machine_ID, machine.Making_Year, machine.Class, machine.Team, machine.Machine_series, machine.value_points, machine.quality_rank, technician.technician_id, technician.Name, technician...
SELECT Team FROM technician GROUP BY Team ORDER BY COUNT(*) DESC LIMIT 1;
Tables: repair, machine, technician, repair_assignment Columns: repair.repair_ID, repair.name, repair.Launch_Date, repair.Notes, machine.Machine_ID, machine.Making_Year, machine.Class, machine.Team, machine.Machine_series, machine.value_points, machine.quality_rank, technician.technician_id, technician.Name, technician...
SELECT Team FROM technician GROUP BY Team HAVING COUNT(*) >= 2;
Tables: repair, machine, technician, repair_assignment Columns: repair.repair_ID, repair.name, repair.Launch_Date, repair.Notes, machine.Machine_ID, machine.Making_Year, machine.Class, machine.Team, machine.Machine_series, machine.value_points, machine.quality_rank, technician.technician_id, technician.Name, technician...
SELECT Team FROM technician GROUP BY Team HAVING COUNT(*) >= 2;
Tables: repair, machine, technician, repair_assignment Columns: repair.repair_ID, repair.name, repair.Launch_Date, repair.Notes, machine.Machine_ID, machine.Making_Year, machine.Class, machine.Team, machine.Machine_series, machine.value_points, machine.quality_rank, technician.technician_id, technician.Name, technician...
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;
Tables: repair, machine, technician, repair_assignment Columns: repair.repair_ID, repair.name, repair.Launch_Date, repair.Notes, machine.Machine_ID, machine.Making_Year, machine.Class, machine.Team, machine.Machine_series, machine.value_points, machine.quality_rank, technician.technician_id, technician.Name, technician...
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;
Tables: repair, machine, technician, repair_assignment Columns: repair.repair_ID, repair.name, repair.Launch_Date, repair.Notes, machine.Machine_ID, machine.Making_Year, machine.Class, machine.Team, machine.Machine_series, machine.value_points, machine.quality_rank, technician.technician_id, technician.Name, technician...
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;
Tables: repair, machine, technician, repair_assignment Columns: repair.repair_ID, repair.name, repair.Launch_Date, repair.Notes, machine.Machine_ID, machine.Making_Year, machine.Class, machine.Team, machine.Machine_series, machine.value_points, machine.quality_rank, technician.technician_id, technician.Name, technician...
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;
Tables: repair, machine, technician, repair_assignment Columns: repair.repair_ID, repair.name, repair.Launch_Date, repair.Notes, machine.Machine_ID, machine.Making_Year, machine.Class, machine.Team, machine.Machine_series, machine.value_points, machine.quality_rank, technician.technician_id, technician.Name, technician...
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;
Tables: repair, machine, technician, repair_assignment Columns: repair.repair_ID, repair.name, repair.Launch_Date, repair.Notes, machine.Machine_ID, machine.Making_Year, machine.Class, machine.Team, machine.Machine_series, machine.value_points, machine.quality_rank, technician.technician_id, technician.Name, technician...
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;
Tables: repair, machine, technician, repair_assignment Columns: repair.repair_ID, repair.name, repair.Launch_Date, repair.Notes, machine.Machine_ID, machine.Making_Year, machine.Class, machine.Team, machine.Machine_series, machine.value_points, machine.quality_rank, technician.technician_id, technician.Name, technician...
SELECT T2.Name , COUNT(*) FROM repair_assignment AS T1 JOIN technician AS T2 ON T1.technician_ID = T2.technician_ID GROUP BY T2.Name;
Tables: repair, machine, technician, repair_assignment Columns: repair.repair_ID, repair.name, repair.Launch_Date, repair.Notes, machine.Machine_ID, machine.Making_Year, machine.Class, machine.Team, machine.Machine_series, machine.value_points, machine.quality_rank, technician.technician_id, technician.Name, technician...
SELECT T2.Name , COUNT(*) FROM repair_assignment AS T1 JOIN technician AS T2 ON T1.technician_ID = T2.technician_ID GROUP BY T2.Name;
Tables: repair, machine, technician, repair_assignment Columns: repair.repair_ID, repair.name, repair.Launch_Date, repair.Notes, machine.Machine_ID, machine.Making_Year, machine.Class, machine.Team, machine.Machine_series, machine.value_points, machine.quality_rank, technician.technician_id, technician.Name, technician...
SELECT Name FROM technician WHERE technician_id NOT IN (SELECT technician_id FROM repair_assignment);
Tables: repair, machine, technician, repair_assignment Columns: repair.repair_ID, repair.name, repair.Launch_Date, repair.Notes, machine.Machine_ID, machine.Making_Year, machine.Class, machine.Team, machine.Machine_series, machine.value_points, machine.quality_rank, technician.technician_id, technician.Name, technician...
SELECT Name FROM technician WHERE technician_id NOT IN (SELECT technician_id FROM repair_assignment);
Tables: repair, machine, technician, repair_assignment Columns: repair.repair_ID, repair.name, repair.Launch_Date, repair.Notes, machine.Machine_ID, machine.Making_Year, machine.Class, machine.Team, machine.Machine_series, machine.value_points, machine.quality_rank, technician.technician_id, technician.Name, technician...
SELECT Starting_Year FROM technician WHERE Team = "CLE" INTERSECT SELECT Starting_Year FROM technician WHERE Team = "CWS";
Tables: repair, machine, technician, repair_assignment Columns: repair.repair_ID, repair.name, repair.Launch_Date, repair.Notes, machine.Machine_ID, machine.Making_Year, machine.Class, machine.Team, machine.Machine_series, machine.value_points, machine.quality_rank, technician.technician_id, technician.Name, technician...
SELECT Starting_Year FROM technician WHERE Team = "CLE" INTERSECT SELECT Starting_Year FROM technician WHERE Team = "CWS";
Tables: entrepreneur, people Columns: entrepreneur.Entrepreneur_ID, entrepreneur.People_ID, entrepreneur.Company, entrepreneur.Money_Requested, entrepreneur.Investor, people.People_ID, people.Name, people.Height, people.Weight, people.Date_of_Birth Question: How many entrepreneurs are there? [/INST]
SELECT count(*) FROM entrepreneur;
Tables: entrepreneur, people Columns: entrepreneur.Entrepreneur_ID, entrepreneur.People_ID, entrepreneur.Company, entrepreneur.Money_Requested, entrepreneur.Investor, people.People_ID, people.Name, people.Height, people.Weight, people.Date_of_Birth Question: Count the number of entrepreneurs. [/INST]
SELECT count(*) FROM entrepreneur;
Tables: entrepreneur, people Columns: entrepreneur.Entrepreneur_ID, entrepreneur.People_ID, entrepreneur.Company, entrepreneur.Money_Requested, entrepreneur.Investor, people.People_ID, people.Name, people.Height, people.Weight, people.Date_of_Birth Question: List the companies of entrepreneurs in descending order of mo...
SELECT Company FROM entrepreneur ORDER BY Money_Requested DESC;
Tables: entrepreneur, people Columns: entrepreneur.Entrepreneur_ID, entrepreneur.People_ID, entrepreneur.Company, entrepreneur.Money_Requested, entrepreneur.Investor, people.People_ID, people.Name, people.Height, people.Weight, people.Date_of_Birth Question: What are the companies of entrepreneurs, ordered descending b...
SELECT Company FROM entrepreneur ORDER BY Money_Requested DESC;
Tables: entrepreneur, people Columns: entrepreneur.Entrepreneur_ID, entrepreneur.People_ID, entrepreneur.Company, entrepreneur.Money_Requested, entrepreneur.Investor, people.People_ID, people.Name, people.Height, people.Weight, people.Date_of_Birth Question: List the companies and the investors of entrepreneurs. [/INST...
SELECT Company , Investor FROM entrepreneur;
Tables: entrepreneur, people Columns: entrepreneur.Entrepreneur_ID, entrepreneur.People_ID, entrepreneur.Company, entrepreneur.Money_Requested, entrepreneur.Investor, people.People_ID, people.Name, people.Height, people.Weight, people.Date_of_Birth Question: What are the companies and investors that correspond to each ...
SELECT Company , Investor FROM entrepreneur;
Tables: entrepreneur, people Columns: entrepreneur.Entrepreneur_ID, entrepreneur.People_ID, entrepreneur.Company, entrepreneur.Money_Requested, entrepreneur.Investor, people.People_ID, people.Name, people.Height, people.Weight, people.Date_of_Birth Question: What is the average money requested by all entrepreneurs? [/I...
SELECT avg(Money_Requested) FROM entrepreneur;
Tables: entrepreneur, people Columns: entrepreneur.Entrepreneur_ID, entrepreneur.People_ID, entrepreneur.Company, entrepreneur.Money_Requested, entrepreneur.Investor, people.People_ID, people.Name, people.Height, people.Weight, people.Date_of_Birth Question: Return the average money requested across all entrepreneurs. ...
SELECT avg(Money_Requested) FROM entrepreneur;
Tables: entrepreneur, people Columns: entrepreneur.Entrepreneur_ID, entrepreneur.People_ID, entrepreneur.Company, entrepreneur.Money_Requested, entrepreneur.Investor, people.People_ID, people.Name, people.Height, people.Weight, people.Date_of_Birth Question: What are the names of people in ascending order of weight? [/...
SELECT Name FROM People ORDER BY Weight ASC;
Tables: entrepreneur, people Columns: entrepreneur.Entrepreneur_ID, entrepreneur.People_ID, entrepreneur.Company, entrepreneur.Money_Requested, entrepreneur.Investor, people.People_ID, people.Name, people.Height, people.Weight, people.Date_of_Birth Question: Return the names of people, ordered by weight ascending. [/IN...
SELECT Name FROM People ORDER BY Weight ASC;
Tables: entrepreneur, people Columns: entrepreneur.Entrepreneur_ID, entrepreneur.People_ID, entrepreneur.Company, entrepreneur.Money_Requested, entrepreneur.Investor, people.People_ID, people.Name, people.Height, people.Weight, people.Date_of_Birth Question: What are the names of entrepreneurs? [/INST]
SELECT T2.Name FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID;
Tables: entrepreneur, people Columns: entrepreneur.Entrepreneur_ID, entrepreneur.People_ID, entrepreneur.Company, entrepreneur.Money_Requested, entrepreneur.Investor, people.People_ID, people.Name, people.Height, people.Weight, people.Date_of_Birth Question: Return the names of entrepreneurs. [/INST]
SELECT T2.Name FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID;
Tables: entrepreneur, people Columns: entrepreneur.Entrepreneur_ID, entrepreneur.People_ID, entrepreneur.Company, entrepreneur.Money_Requested, entrepreneur.Investor, people.People_ID, people.Name, people.Height, people.Weight, people.Date_of_Birth Question: What are the names of entrepreneurs whose investor is not "Ra...
SELECT T2.Name FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Investor != "Rachel Elnaugh";
Tables: entrepreneur, people Columns: entrepreneur.Entrepreneur_ID, entrepreneur.People_ID, entrepreneur.Company, entrepreneur.Money_Requested, entrepreneur.Investor, people.People_ID, people.Name, people.Height, people.Weight, people.Date_of_Birth Question: Return the names of entrepreneurs do no not have the investor...
SELECT T2.Name FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Investor != "Rachel Elnaugh";
Tables: entrepreneur, people Columns: entrepreneur.Entrepreneur_ID, entrepreneur.People_ID, entrepreneur.Company, entrepreneur.Money_Requested, entrepreneur.Investor, people.People_ID, people.Name, people.Height, people.Weight, people.Date_of_Birth Question: What is the weight of the shortest person? [/INST]
SELECT Weight FROM people ORDER BY Height ASC LIMIT 1;
Tables: entrepreneur, people Columns: entrepreneur.Entrepreneur_ID, entrepreneur.People_ID, entrepreneur.Company, entrepreneur.Money_Requested, entrepreneur.Investor, people.People_ID, people.Name, people.Height, people.Weight, people.Date_of_Birth Question: Return the weight of the shortest person. [/INST]
SELECT Weight FROM people ORDER BY Height ASC LIMIT 1;
Tables: entrepreneur, people Columns: entrepreneur.Entrepreneur_ID, entrepreneur.People_ID, entrepreneur.Company, entrepreneur.Money_Requested, entrepreneur.Investor, people.People_ID, people.Name, people.Height, people.Weight, people.Date_of_Birth Question: What is the name of the entrepreneur with the greatest weight...
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;
Tables: entrepreneur, people Columns: entrepreneur.Entrepreneur_ID, entrepreneur.People_ID, entrepreneur.Company, entrepreneur.Money_Requested, entrepreneur.Investor, people.People_ID, people.Name, people.Height, people.Weight, people.Date_of_Birth Question: Return the name of the heaviest entrepreneur. [/INST]
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;
Tables: entrepreneur, people Columns: entrepreneur.Entrepreneur_ID, entrepreneur.People_ID, entrepreneur.Company, entrepreneur.Money_Requested, entrepreneur.Investor, people.People_ID, people.Name, people.Height, people.Weight, people.Date_of_Birth Question: What is the total money requested by entrepreneurs with heigh...
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;
Tables: entrepreneur, people Columns: entrepreneur.Entrepreneur_ID, entrepreneur.People_ID, entrepreneur.Company, entrepreneur.Money_Requested, entrepreneur.Investor, people.People_ID, people.Name, people.Height, people.Weight, people.Date_of_Birth Question: Give the total money requested by entrepreneurs who are talle...
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;
Tables: entrepreneur, people Columns: entrepreneur.Entrepreneur_ID, entrepreneur.People_ID, entrepreneur.Company, entrepreneur.Money_Requested, entrepreneur.Investor, people.People_ID, people.Name, people.Height, people.Weight, people.Date_of_Birth Question: What are the dates of birth of entrepreneurs with investor "S...
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";
Tables: entrepreneur, people Columns: entrepreneur.Entrepreneur_ID, entrepreneur.People_ID, entrepreneur.Company, entrepreneur.Money_Requested, entrepreneur.Investor, people.People_ID, people.Name, people.Height, people.Weight, people.Date_of_Birth Question: Return the dates of birth for entrepreneurs who have either t...
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";
Tables: entrepreneur, people Columns: entrepreneur.Entrepreneur_ID, entrepreneur.People_ID, entrepreneur.Company, entrepreneur.Money_Requested, entrepreneur.Investor, people.People_ID, people.Name, people.Height, people.Weight, people.Date_of_Birth Question: What are the weights of entrepreneurs in descending order of ...
SELECT T2.Weight FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Money_Requested DESC;
Tables: entrepreneur, people Columns: entrepreneur.Entrepreneur_ID, entrepreneur.People_ID, entrepreneur.Company, entrepreneur.Money_Requested, entrepreneur.Investor, people.People_ID, people.Name, people.Height, people.Weight, people.Date_of_Birth Question: Return the weights of entrepreneurs, ordered descending by am...
SELECT T2.Weight FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Money_Requested DESC;
Tables: entrepreneur, people Columns: entrepreneur.Entrepreneur_ID, entrepreneur.People_ID, entrepreneur.Company, entrepreneur.Money_Requested, entrepreneur.Investor, people.People_ID, people.Name, people.Height, people.Weight, people.Date_of_Birth Question: What are the investors of entrepreneurs and the corresponding...
SELECT Investor , COUNT(*) FROM entrepreneur GROUP BY Investor;
Tables: entrepreneur, people Columns: entrepreneur.Entrepreneur_ID, entrepreneur.People_ID, entrepreneur.Company, entrepreneur.Money_Requested, entrepreneur.Investor, people.People_ID, people.Name, people.Height, people.Weight, people.Date_of_Birth Question: How many entrepreneurs correspond to each investor? [/INST]
SELECT Investor , COUNT(*) FROM entrepreneur GROUP BY Investor;
Tables: entrepreneur, people Columns: entrepreneur.Entrepreneur_ID, entrepreneur.People_ID, entrepreneur.Company, entrepreneur.Money_Requested, entrepreneur.Investor, people.People_ID, people.Name, people.Height, people.Weight, people.Date_of_Birth Question: What is the investor that has invested in the most number of ...
SELECT Investor FROM entrepreneur GROUP BY Investor ORDER BY COUNT(*) DESC LIMIT 1;
Tables: entrepreneur, people Columns: entrepreneur.Entrepreneur_ID, entrepreneur.People_ID, entrepreneur.Company, entrepreneur.Money_Requested, entrepreneur.Investor, people.People_ID, people.Name, people.Height, people.Weight, people.Date_of_Birth Question: Return the investor who have invested in the greatest number ...
SELECT Investor FROM entrepreneur GROUP BY Investor ORDER BY COUNT(*) DESC LIMIT 1;
Tables: entrepreneur, people Columns: entrepreneur.Entrepreneur_ID, entrepreneur.People_ID, entrepreneur.Company, entrepreneur.Money_Requested, entrepreneur.Investor, people.People_ID, people.Name, people.Height, people.Weight, people.Date_of_Birth Question: What are the investors that have invested in at least two ent...
SELECT Investor FROM entrepreneur GROUP BY Investor HAVING COUNT(*) >= 2;
Tables: entrepreneur, people Columns: entrepreneur.Entrepreneur_ID, entrepreneur.People_ID, entrepreneur.Company, entrepreneur.Money_Requested, entrepreneur.Investor, people.People_ID, people.Name, people.Height, people.Weight, people.Date_of_Birth Question: Return the investors who have invested in two or more entrepr...
SELECT Investor FROM entrepreneur GROUP BY Investor HAVING COUNT(*) >= 2;
Tables: entrepreneur, people Columns: entrepreneur.Entrepreneur_ID, entrepreneur.People_ID, entrepreneur.Company, entrepreneur.Money_Requested, entrepreneur.Investor, people.People_ID, people.Name, people.Height, people.Weight, people.Date_of_Birth Question: List the names of entrepreneurs and their companies in descen...
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;
Tables: entrepreneur, people Columns: entrepreneur.Entrepreneur_ID, entrepreneur.People_ID, entrepreneur.Company, entrepreneur.Money_Requested, entrepreneur.Investor, people.People_ID, people.Name, people.Height, people.Weight, people.Date_of_Birth Question: What are the names of entrepreneurs and their corresponding i...
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;
Tables: entrepreneur, people Columns: entrepreneur.Entrepreneur_ID, entrepreneur.People_ID, entrepreneur.Company, entrepreneur.Money_Requested, entrepreneur.Investor, people.People_ID, people.Name, people.Height, people.Weight, people.Date_of_Birth Question: List the names of people that are not entrepreneurs. [/INST]
SELECT Name FROM people WHERE People_ID NOT IN (SELECT People_ID FROM entrepreneur);
Tables: entrepreneur, people Columns: entrepreneur.Entrepreneur_ID, entrepreneur.People_ID, entrepreneur.Company, entrepreneur.Money_Requested, entrepreneur.Investor, people.People_ID, people.Name, people.Height, people.Weight, people.Date_of_Birth Question: What are the names of people who are not entrepreneurs? [/INS...
SELECT Name FROM people WHERE People_ID NOT IN (SELECT People_ID FROM entrepreneur);
Tables: entrepreneur, people Columns: entrepreneur.Entrepreneur_ID, entrepreneur.People_ID, entrepreneur.Company, entrepreneur.Money_Requested, entrepreneur.Investor, people.People_ID, people.Name, people.Height, people.Weight, people.Date_of_Birth Question: Show the investors shared by entrepreneurs that requested mor...
SELECT Investor FROM entrepreneur WHERE Money_Requested > 140000 INTERSECT SELECT Investor FROM entrepreneur WHERE Money_Requested < 120000;
Tables: entrepreneur, people Columns: entrepreneur.Entrepreneur_ID, entrepreneur.People_ID, entrepreneur.Company, entrepreneur.Money_Requested, entrepreneur.Investor, people.People_ID, people.Name, people.Height, people.Weight, people.Date_of_Birth Question: What are the investors who have invested in both entrepreneur...
SELECT Investor FROM entrepreneur WHERE Money_Requested > 140000 INTERSECT SELECT Investor FROM entrepreneur WHERE Money_Requested < 120000;
Tables: entrepreneur, people Columns: entrepreneur.Entrepreneur_ID, entrepreneur.People_ID, entrepreneur.Company, entrepreneur.Money_Requested, entrepreneur.Investor, people.People_ID, people.Name, people.Height, people.Weight, people.Date_of_Birth Question: How many distinct companies are there? [/INST]
SELECT count(DISTINCT Company) FROM entrepreneur;