target-benchmark/spider-queries huggingface dataset:
Database: movie_2 (tables: movietheaters)
Question: What are the names of every theater with at least one movie playing?
SQL: SELECT name FROM movietheaters GROUP BY name HAVING count(*)  >=  1
Database: movie_2 (tables: movietheaters)
Question: Select the name of all movie theaters that are not currently showing a movie.
SQL: SELECT DISTINCT name FROM MovieTheaters WHERE Movie  =  'null'
Database: movie_2 (tables: movietheaters)
Question: What are the names of all cinemas not showing any movies?
SQL: SELECT DISTINCT name FROM MovieTheaters WHERE Movie  =  'null'
Database: movie_2 (tables: movietheaters, movies)
Question: Find the name of the movie theaters that are playing the movies whose rating is ‘G’.
SQL: SELECT T2.name FROM movies AS T1 JOIN movietheaters AS T2 ON T1.code  =  T2.movie WHERE T1.rating  =  'G'
Database: movie_2 (tables: movietheaters, movies)
Question: What are the names of theaters playing 'G' rated movies?
SQL: SELECT T2.name FROM movies AS T1 JOIN movietheaters AS T2 ON T1.code  =  T2.movie WHERE T1.rating  =  'G'
Database: movie_2 (tables: movies)
Question: Select the title of all movies.
SQL: SELECT title FROM movies
Database: movie_2 (tables: movies)
Question: What are all of the movie names?
SQL: SELECT title FROM movies
Database: movie_2 (tables: movies)
Question: Show all the distinct ratings in the database.
SQL: SELECT DISTINCT rating FROM movies
Database: movie_2 (tables: movies)
Question: What are the different movie ratings?
SQL: SELECT DISTINCT rating FROM movies
Database: movie_2 (tables: movies)
Question: Show all information of all unrated movies.
SQL: SELECT * FROM movies WHERE rating  =  'null'
Database: movie_2 (tables: movies)
Question: What is all the information about the unrated movies?
SQL: SELECT * FROM movies WHERE rating  =  'null'
Database: movie_2 (tables: movietheaters, movies)
Question: Show the titles of movies not currently being shown in any theaters.
SQL: SELECT Title FROM Movies WHERE Code NOT IN (SELECT Movie FROM MovieTheaters WHERE Movie != 'null')
Database: movie_2 (tables: movietheaters, movies)
Question: What are the names of the movies not being shown in any theaters?
SQL: SELECT Title FROM Movies WHERE Code NOT IN (SELECT Movie FROM MovieTheaters WHERE Movie != 'null')
Database: planet_1 (tables: package, client)
Question: Who receieved the heaviest package?
SQL: SELECT T2.Name FROM PACKAGE AS T1 JOIN Client AS T2 ON T1.Recipient  =  T2.AccountNumber ORDER BY T1.Weight DESC LIMIT 1
Database: planet_1 (tables: package, client)
Question: What is the name of the client who received the heaviest package?
SQL: SELECT T2.Name FROM PACKAGE AS T1 JOIN Client AS T2 ON T1.Recipient  =  T2.AccountNumber ORDER BY T1.Weight DESC LIMIT 1
Database: planet_1 (tables: package, client)
Question: What is the total weight of all the packages that customer Leo Wong sent?
SQL: SELECT sum(T1.Weight) FROM PACKAGE AS T1 JOIN Client AS T2 ON T1.Sender  =  T2.AccountNumber WHERE T2.Name  =  "Leo Wong";
Database: planet_1 (tables: package, client)
Question: What is the total weight for all packages that Leo Wong sent?
SQL: SELECT sum(T1.Weight) FROM PACKAGE AS T1 JOIN Client AS T2 ON T1.Sender  =  T2.AccountNumber WHERE T2.Name  =  "Leo Wong";
Database: planet_1 (tables: employee)
Question: What is the position of Amy Wong?
SQL: SELECT POSITION FROM Employee WHERE Name  =  "Amy Wong";
Database: planet_1 (tables: employee)
Question: What position does Amy Wong have?
SQL: SELECT POSITION FROM Employee WHERE Name  =  "Amy Wong";
Database: planet_1 (tables: employee)
Question: What is Turanga Leela's salary and position?
SQL: SELECT Salary ,  POSITION FROM Employee WHERE Name  =  "Turanga Leela";
Database: planet_1 (tables: employee)
Question: What is the salary and position of the employee named Turanga Leela?
SQL: SELECT Salary ,  POSITION FROM Employee WHERE Name  =  "Turanga Leela";
Database: planet_1 (tables: employee)
Question: What is the average salary of all intern jobs?
SQL: SELECT avg(Salary) FROM Employee WHERE POSITION  =  "Intern";
Database: planet_1 (tables: employee)
Question: What is the average salary of an intern?
SQL: SELECT avg(Salary) FROM Employee WHERE POSITION  =  "Intern";
Database: planet_1 (tables: employee, has_clearance)
Question: What level is Physician?
SQL: SELECT T1.Level FROM Has_Clearance AS T1 JOIN Employee AS T2 ON T1.Employee = T2.EmployeeID WHERE T2.position  =  "Physician";
Database: planet_1 (tables: employee, has_clearance)
Question: What is the clearance level of a physician?
SQL: SELECT T1.Level FROM Has_Clearance AS T1 JOIN Employee AS T2 ON T1.Employee = T2.EmployeeID WHERE T2.position  =  "Physician";
Database: planet_1 (tables: package, client)
Question: List Package Number of all package sent by Leo Wong?
SQL: SELECT T1.PackageNumber FROM PACKAGE AS T1 JOIN Client AS T2 ON T1.Sender  =  T2.AccountNumber WHERE T2.Name  =  "Leo Wong";
Database: planet_1 (tables: package, client)
Question: What is the number of all packages that Leo Wong sent?
SQL: SELECT T1.PackageNumber FROM PACKAGE AS T1 JOIN Client AS T2 ON T1.Sender  =  T2.AccountNumber WHERE T2.Name  =  "Leo Wong";
Database: planet_1 (tables: client, package)
Question: List all package numbers received by Leo Wong ?
SQL: select t1.packagenumber from package as t1 join client as t2 on t1.recipient  =  t2.accountnumber where t2.name = "leo wong";
Database: planet_1 (tables: package, client)
Question: What are all of the package numbers received by Leo Wong?
SQL: SELECT T1.PackageNumber FROM PACKAGE AS T1 JOIN Client AS T2 ON T1.Recipient  =  T2.AccountNumber WHERE T2.Name = "Leo Wong";
Database: planet_1 (tables: package, client)
Question: List all package sent or received by Leo Wong.
SQL: SELECT DISTINCT T1.PackageNumber FROM PACKAGE AS T1 JOIN Client AS T2 ON T1.Sender  =  T2.AccountNumber OR T1.Recipient  =  T2.AccountNumber WHERE T2.Name = "Leo Wong"
Database: planet_1 (tables: package, client)
Question: What are all the different package numbers that Leo Wong sent or received?
SQL: SELECT DISTINCT T1.PackageNumber FROM PACKAGE AS T1 JOIN Client AS T2 ON T1.Sender  =  T2.AccountNumber OR T1.Recipient  =  T2.AccountNumber WHERE T2.Name = "Leo Wong"
Database: planet_1 (tables: package, client)
Question: Count the number of packages sent by Ogden Wernstrom and received by Leo Wong.
SQL: SELECT T1.PackageNumber FROM PACKAGE AS T1 JOIN Client AS T2 ON T1.Sender  =  T2.AccountNumber WHERE T2.Name = "Ogden Wernstrom" INTERSECT SELECT T1.PackageNumber FROM PACKAGE AS T1 JOIN Client AS T2 ON T1.Recipient  =  T2.AccountNumber WHERE T2.Name = "Leo Wong"
Database: planet_1 (tables: package, client)
Question: How many packages sent by Ogden Wernstrom and received by Leo Wong?
SQL: SELECT T1.PackageNumber FROM PACKAGE AS T1 JOIN Client AS T2 ON T1.Sender  =  T2.AccountNumber WHERE T2.Name = "Ogden Wernstrom" INTERSECT SELECT T1.PackageNumber FROM PACKAGE AS T1 JOIN Client AS T2 ON T1.Recipient  =  T2.AccountNumber WHERE T2.Name = "Leo Wong"
Database: planet_1 (tables: package, client)
Question: What are the contents of package sent by John Zoidfarb?
SQL: SELECT T1.Contents FROM PACKAGE AS T1 JOIN Client AS T2 ON T1.Sender  =  T2.AccountNumber WHERE T2.Name  =  "John Zoidfarb";
Database: planet_1 (tables: package, client)
Question: What are the package contents of all those sent by John Zoidfarb?
SQL: SELECT T1.Contents FROM PACKAGE AS T1 JOIN Client AS T2 ON T1.Sender  =  T2.AccountNumber WHERE T2.Name  =  "John Zoidfarb";
Database: planet_1 (tables: package, client)
Question: What is the heaviest package sent by the clients which 'John' is part of their name? List package number and weight.
SQL: SELECT T1.PackageNumber ,  max(T1.Weight) FROM PACKAGE AS T1 JOIN Client AS T2 ON T1.Sender  =  T2.AccountNumber WHERE T2.Name LIKE "John";
Database: planet_1 (tables: package, client)
Question: What is the package number and weight of the heaviest package that was sent by a client named John or something similar?
SQL: SELECT T1.PackageNumber ,  max(T1.Weight) FROM PACKAGE AS T1 JOIN Client AS T2 ON T1.Sender  =  T2.AccountNumber WHERE T2.Name LIKE "John";
Database: planet_1 (tables: package)
Question: List package number and weight of top 3 lightest packages.
SQL: SELECT PackageNumber ,  Weight FROM PACKAGE ORDER BY Weight ASC LIMIT 3;
Database: planet_1 (tables: package)
Question: What is the package number and weight of the 3 lightest packages?
SQL: SELECT PackageNumber ,  Weight FROM PACKAGE ORDER BY Weight ASC LIMIT 3;
Database: planet_1 (tables: package, client)
Question: Who sent most number of packages? List client name and number of packages sent by that client.
SQL: SELECT T2.Name ,  count(*) FROM PACKAGE AS T1 JOIN Client AS T2 ON T1.Sender  =  T2.AccountNumber GROUP BY T1.Sender ORDER BY count(*) DESC LIMIT 1;
Database: planet_1 (tables: package, client)
Question: What is the name of the client who sent the most packages and how many were there?
SQL: SELECT T2.Name ,  count(*) FROM PACKAGE AS T1 JOIN Client AS T2 ON T1.Sender  =  T2.AccountNumber GROUP BY T1.Sender ORDER BY count(*) DESC LIMIT 1;
Database: planet_1 (tables: client, package)
Question: Who received least number of packages ? List client name and number of packages received by that client .
SQL: select t2.name ,  count(*) from package as t1 join client as t2 on t1.recipient  =  t2.accountnumber group by t1.recipient order by count(*) limit 1;
Database: planet_1 (tables: client, package)
Question: What is the smallest number of packages received and by whom ?
SQL: select t2.name ,  count(*) from package as t1 join client as t2 on t1.recipient  =  t2.accountnumber group by t1.recipient order by count(*) limit 1;
Database: planet_1 (tables: package, client)
Question: Who sent more than one packages? List the client's name.
SQL: SELECT T2.Name ,  count(*) FROM PACKAGE AS T1 JOIN Client AS T2 ON T1.Sender  =  T2.AccountNumber GROUP BY T1.Sender HAVING count(*)  >  1;
Database: planet_1 (tables: package, client)
Question: What is the name of all clients who sent more than one package?
SQL: SELECT T2.Name ,  count(*) FROM PACKAGE AS T1 JOIN Client AS T2 ON T1.Sender  =  T2.AccountNumber GROUP BY T1.Sender HAVING count(*)  >  1;
Database: planet_1 (tables: planet)
Question: What are the Coordinates of planet Mars?
SQL: SELECT Coordinates FROM Planet WHERE Name  =  "Mars";
Database: planet_1 (tables: planet)
Question: What are the coordinates of the planet named Mars?
SQL: SELECT Coordinates FROM Planet WHERE Name  =  "Mars";
Database: planet_1 (tables: planet)
Question: List all Planets' names and coordinates in alphabetical order of name.
SQL: SELECT Name ,  Coordinates FROM Planet ORDER BY Name
Database: planet_1 (tables: planet)
Question: What are the names and coordinates of all planets in alphabetical order by name?
SQL: SELECT Name ,  Coordinates FROM Planet ORDER BY Name
Database: planet_1 (tables: employee, shipment)
Question: List all shipment id under Phillip J. Fry's management.
SQL: SELECT T1.ShipmentID FROM Shipment AS T1 JOIN Employee AS T2 ON T1.Manager = T2.EmployeeID WHERE T2.Name = "Phillip J. Fry";
Database: planet_1 (tables: employee, shipment)
Question: What are the shipment IDs of every delivery managed by Phillip J Fry?
SQL: SELECT T1.ShipmentID FROM Shipment AS T1 JOIN Employee AS T2 ON T1.Manager = T2.EmployeeID WHERE T2.Name = "Phillip J. Fry";
Database: planet_1 (tables: shipment)
Question: List the dates of all shipments.
SQL: SELECT Date FROM Shipment;
Database: planet_1 (tables: shipment)
Question: What are the dates of every shipment in the database?
SQL: SELECT Date FROM Shipment;
Database: planet_1 (tables: planet, shipment)
Question: List all shipment ids for the planet Mars.
SQL: SELECT T1.ShipmentID FROM Shipment AS T1 JOIN Planet AS T2 ON T1.Planet = T2.PlanetID WHERE T2.Name  =  "Mars";
Database: planet_1 (tables: planet, shipment)
Question: What are the shipment ids for the planet Mars?
SQL: SELECT T1.ShipmentID FROM Shipment AS T1 JOIN Planet AS T2 ON T1.Planet = T2.PlanetID WHERE T2.Name  =  "Mars";
Database: planet_1 (tables: planet, employee, shipment)
Question: List all shipment ids for the planet Mars and under the management of Turanga Leela.
SQL: SELECT T1.ShipmentID FROM Shipment AS T1 JOIN Planet AS T2 ON T1.Planet = T2.PlanetID JOIN Employee AS T3 ON T3.EmployeeID = T1.Manager WHERE T2.Name = "Mars" AND T3.Name = "Turanga Leela";
Database: planet_1 (tables: planet, employee, shipment)
Question: What are the ids of all shipments on the planet Mars that are managed by Turanga Leela?
SQL: SELECT T1.ShipmentID FROM Shipment AS T1 JOIN Planet AS T2 ON T1.Planet = T2.PlanetID JOIN Employee AS T3 ON T3.EmployeeID = T1.Manager WHERE T2.Name = "Mars" AND T3.Name = "Turanga Leela";
Database: planet_1 (tables: planet, employee, shipment)
Question: List all shipment ids on the planet Mars or under the management of Turanga Leela.
SQL: SELECT T1.ShipmentID FROM Shipment AS T1 JOIN Planet AS T2 ON T1.Planet = T2.PlanetID JOIN Employee AS T3 ON T3.EmployeeID = T1.Manager WHERE T2.Name = "Mars" OR T3.Name = "Turanga Leela";
Database: planet_1 (tables: planet, employee, shipment)
Question: What are the ids for all shipments on the planet Mars that Turanga Leela manages?
SQL: SELECT T1.ShipmentID FROM Shipment AS T1 JOIN Planet AS T2 ON T1.Planet = T2.PlanetID JOIN Employee AS T3 ON T3.EmployeeID = T1.Manager WHERE T2.Name = "Mars" OR T3.Name = "Turanga Leela";
Database: planet_1 (tables: planet, shipment)
Question: What is the total shipments in each planet? List the planet name and total shipments.
SQL: SELECT T2.Name ,  count(*) FROM Shipment AS T1 JOIN Planet AS T2 ON T1.Planet = T2.PlanetID GROUP BY T1.Planet;
Database: planet_1 (tables: planet, shipment)
Question: How many shipments take place on each planet?
SQL: SELECT T2.Name ,  count(*) FROM Shipment AS T1 JOIN Planet AS T2 ON T1.Planet = T2.PlanetID GROUP BY T1.Planet;
Database: planet_1 (tables: planet, shipment)
Question: Which planet has most shipments? List the planet name.
SQL: SELECT T2.Name FROM Shipment AS T1 JOIN Planet AS T2 ON T1.Planet = T2.PlanetID GROUP BY T1.Planet ORDER BY count(*) DESC LIMIT 1;
Database: planet_1 (tables: planet, shipment)
Question: What is the name of the planet with the most shipments?
SQL: SELECT T2.Name FROM Shipment AS T1 JOIN Planet AS T2 ON T1.Planet = T2.PlanetID GROUP BY T1.Planet ORDER BY count(*) DESC LIMIT 1;
Database: planet_1 (tables: employee, shipment)
Question: List the manger's name and number of shipments under his management.
SQL: SELECT T2.Name ,  count(*) FROM Shipment AS T1 JOIN Employee AS T2 ON T1.Manager = T2.EmployeeID GROUP BY T1.Manager;
Database: planet_1 (tables: employee, shipment)
Question: What are the number of shipments managed and names of each manager?
SQL: SELECT T2.Name ,  count(*) FROM Shipment AS T1 JOIN Employee AS T2 ON T1.Manager = T2.EmployeeID GROUP BY T1.Manager;
Database: planet_1 (tables: planet, shipment, package)
Question: Calculate total weight of package shipped on Mars.
SQL: SELECT sum(T1.Weight) FROM PACKAGE AS T1 JOIN Shipment AS T2 ON T1.Shipment = T2.ShipmentID JOIN Planet AS T3 ON T2.Planet = T3.PlanetID WHERE T3.Name = "Mars";
Database: planet_1 (tables: planet, shipment, package)
Question: what is the total weight of all packages shipped on Mars?
SQL: SELECT sum(T1.Weight) FROM PACKAGE AS T1 JOIN Shipment AS T2 ON T1.Shipment = T2.ShipmentID JOIN Planet AS T3 ON T2.Planet = T3.PlanetID WHERE T3.Name = "Mars";
Database: planet_1 (tables: shipment, planet, package)
Question: Calculate total weight of package shipped in each planet . show the name of each planet .
SQL: select t3.name ,  sum(t1.weight) from package as t1 join shipment as t2 on t1.shipment = t2.shipmentid join planet as t3 on t2.planet = t3.planetid group by t2.planet;
Database: planet_1 (tables: shipment, planet, package)
Question: what is the total package weight for each planet, list its name ?
SQL: select t3.name ,  sum(t1.weight) from package as t1 join shipment as t2 on t1.shipment = t2.shipmentid join planet as t3 on t2.planet = t3.planetid group by t2.planet;
Database: planet_1 (tables: planet, shipment, package)
Question: Which planet has total weight of shipment greater than 30? List planet name.
SQL: SELECT T3.Name FROM PACKAGE AS T1 JOIN Shipment AS T2 ON T1.Shipment = T2.ShipmentID JOIN Planet AS T3 ON T2.Planet = T3.PlanetID GROUP BY T2.Planet HAVING sum(T1.Weight)  >  30;
Database: planet_1 (tables: planet, shipment, package)
Question: What are the names of all planets tjat have a total shipment weight greater than 30?
SQL: SELECT T3.Name FROM PACKAGE AS T1 JOIN Shipment AS T2 ON T1.Shipment = T2.ShipmentID JOIN Planet AS T3 ON T2.Planet = T3.PlanetID GROUP BY T2.Planet HAVING sum(T1.Weight)  >  30;
Database: planet_1 (tables: planet, shipment, package, client)
Question: List package number of package shipped in planet Omicron Persei 8 and sent by Zapp Brannigan.
SQL: SELECT T1.PackageNumber FROM PACKAGE AS T1 JOIN Client AS T2 ON  T1.Sender = T2.AccountNumber JOIN Shipment AS T3 ON T1.Shipment = T3.ShipmentID JOIN Planet AS T4 ON T3.Planet = T4.PlanetID WHERE T2.Name = "Zapp Brannigan" AND T4.Name = "Omicron Persei 8";
Database: planet_1 (tables: planet, shipment, package, client)
Question: What are the number of packages sent by Zapp Brannigan and shipped on the Omicron Persei 8?
SQL: SELECT T1.PackageNumber FROM PACKAGE AS T1 JOIN Client AS T2 ON  T1.Sender = T2.AccountNumber JOIN Shipment AS T3 ON T1.Shipment = T3.ShipmentID JOIN Planet AS T4 ON T3.Planet = T4.PlanetID WHERE T2.Name = "Zapp Brannigan" AND T4.Name = "Omicron Persei 8";
Database: planet_1 (tables: planet, shipment, package, client)
Question: List package number of packages shipped in Omicron Persei 8 planet or sent by Zapp Brannigan.
SQL: SELECT T1.PackageNumber FROM PACKAGE AS T1 JOIN Client AS T2 ON  T1.Sender = T2.AccountNumber JOIN Shipment AS T3 ON T1.Shipment = T3.ShipmentID JOIN Planet AS T4 ON T3.Planet = T4.PlanetID WHERE T2.Name  =  "Zapp Brannigan" OR T4.Name  =  "Omicron Persei 8";
Database: planet_1 (tables: planet, shipment, package, client)
Question: What are the number of packages shipped on Omicron Persei 8 planet or sent by Zapp Brannigan?
SQL: SELECT T1.PackageNumber FROM PACKAGE AS T1 JOIN Client AS T2 ON  T1.Sender = T2.AccountNumber JOIN Shipment AS T3 ON T1.Shipment = T3.ShipmentID JOIN Planet AS T4 ON T3.Planet = T4.PlanetID WHERE T2.Name  =  "Zapp Brannigan" OR T4.Name  =  "Omicron Persei 8";
Database: planet_1 (tables: package)
Question: Which packages have weight between 10 and 30? List the package number and weight.
SQL: SELECT PackageNumber ,  Weight FROM PACKAGE WHERE Weight BETWEEN 10 AND 30;
Database: planet_1 (tables: package)
Question: What are the package numbers and weights that are between 10 and 30?
SQL: SELECT PackageNumber ,  Weight FROM PACKAGE WHERE Weight BETWEEN 10 AND 30;
Database: planet_1 (tables: employee, has_clearance, planet)
Question: Which employees do not have clearance in Mars? List employee's name.
SQL: SELECT Name FROM Employee EXCEPT SELECT T2.Name FROM Has_Clearance AS T1 JOIN Employee AS T2 ON T1.Employee = T2.EmployeeID JOIN Planet AS T3 ON T1.Planet = T3.PlanetID WHERE T3.Name = "Mars";
Database: planet_1 (tables: employee, has_clearance, planet)
Question: What are the names of all employees who don't have clearance on Mars?
SQL: SELECT Name FROM Employee EXCEPT SELECT T2.Name FROM Has_Clearance AS T1 JOIN Employee AS T2 ON T1.Employee = T2.EmployeeID JOIN Planet AS T3 ON T1.Planet = T3.PlanetID WHERE T3.Name = "Mars";
Database: planet_1 (tables: employee, has_clearance, planet)
Question: Which employees have clearance in Omega III? List employees' name.
SQL: SELECT T2.Name FROM Has_Clearance AS T1 JOIN Employee AS T2 ON T1.Employee = T2.EmployeeID JOIN Planet AS T3 ON T1.Planet = T3.PlanetID WHERE T3.Name  =  "Omega III";
Database: planet_1 (tables: employee, has_clearance, planet)
Question: What are the names of all employees with clearance on Omega III?
SQL: SELECT T2.Name FROM Has_Clearance AS T1 JOIN Employee AS T2 ON T1.Employee = T2.EmployeeID JOIN Planet AS T3 ON T1.Planet = T3.PlanetID WHERE T3.Name  =  "Omega III";
Database: planet_1 (tables: employee, has_clearance, planet)
Question: Which planets that have exact one employee has clearance? List planets' name.
SQL: SELECT T3.Name FROM Has_Clearance AS T1 JOIN Employee AS T2 ON T1.Employee = T2.EmployeeID JOIN Planet AS T3 ON T1.Planet = T3.PlanetID GROUP BY T1.Planet HAVING count(*)  =  1;
Database: planet_1 (tables: employee, has_clearance, planet)
Question: What are the names of all planets with one employee that has clearance?
SQL: SELECT T3.Name FROM Has_Clearance AS T1 JOIN Employee AS T2 ON T1.Employee = T2.EmployeeID JOIN Planet AS T3 ON T1.Planet = T3.PlanetID GROUP BY T1.Planet HAVING count(*)  =  1;
Database: planet_1 (tables: employee)
Question: Which employees have salaries between 5000 and 10000? List employees' name.
SQL: SELECT Name FROM Employee WHERE Salary BETWEEN 5000 AND 10000
Database: planet_1 (tables: employee)
Question: What are the employees's names for those that have salaries between 5000 and 10000?
SQL: SELECT Name FROM Employee WHERE Salary BETWEEN 5000 AND 10000
Database: planet_1 (tables: employee, employee)
Question: Find the name of employees whose salary is above the average salary or more than 5000.
SQL: SELECT Name FROM Employee WHERE Salary  >  5000 OR Salary  >  (SELECT avg(salary) FROM employee)
Database: planet_1 (tables: employee, employee)
Question: What are the names of all employees who have a salary greater than average or more than 5000?
SQL: SELECT Name FROM Employee WHERE Salary  >  5000 OR Salary  >  (SELECT avg(salary) FROM employee)
Database: planet_1 (tables: has_clearance, employee, planet)
Question: Find the number of employees who do not have clearance in Mars .
SQL: select count(*) from employee where employeeid not in ( select t2.employeeid from has_clearance as t1 join employee as t2 on t1.employee = t2.employeeid join planet as t3 on t1.planet = t3.planetid where t3.name = "mars" );
Database: planet_1 (tables: has_clearance, employee, planet)
Question: What is the number of employees that do not have clearance on Mars ?
SQL: select count(*) from employee where employeeid not in ( select t2.employeeid from has_clearance as t1 join employee as t2 on t1.employee = t2.employeeid join planet as t3 on t1.planet = t3.planetid where t3.name = "mars" );
Database: video_game (tables: game)
Question: How many games are there?
SQL: SELECT count(*) FROM game
Database: video_game (tables: game)
Question: Count the number of games.
SQL: SELECT count(*) FROM game
Database: video_game (tables: game)
Question: List the Title and Developers of all games ordered by units sold from large to small.
SQL: SELECT Title ,  Developers FROM game ORDER BY Units_sold_Millions DESC
Database: video_game (tables: game)
Question: What are the titles and developers of all games, sorted by units sold descending?
SQL: SELECT Title ,  Developers FROM game ORDER BY Units_sold_Millions DESC
Database: video_game (tables: game)
Question: What is the average units sold in millions of the games that are not developed by Nintendo?
SQL: SELECT avg(Units_sold_Millions) FROM game WHERE developers != 'Nintendo'
Database: video_game (tables: game)
Question: Return the average number of units sold in millions for games not developed by Nintendo.
SQL: SELECT avg(Units_sold_Millions) FROM game WHERE developers != 'Nintendo'
Database: video_game (tables: platform)
Question: What are the names and market districts of all platforms?
SQL: SELECT Platform_name ,  Market_district FROM platform
Database: video_game (tables: platform)
Question: Return all platform names and corresponding market districts.
SQL: SELECT Platform_name ,  Market_district FROM platform
Database: video_game (tables: platform)
Question: What are the names and id of platforms whose download rank is 1?
SQL: SELECT Platform_name ,  Platform_ID FROM platform WHERE Download_rank  =  1
Database: video_game (tables: platform)
Question: Return the names and ids of all platforms with the download rank of 1.
SQL: SELECT Platform_name ,  Platform_ID FROM platform WHERE Download_rank  =  1
Database: video_game (tables: player)
Question: What are the maximum and minimum rank of the year of players.
SQL: SELECT max(Rank_of_the_year) ,  min(Rank_of_the_year) FROM player