minktn/spider-data huggingface dataset:
Database: chinook_1
Question: What is the name of the most common genre in all tracks?
SQL: SELECT T1.Name FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId  =  T2.GenreId GROUP BY T2.GenreId ORDER BY COUNT(*) DESC LIMIT 1
Database: chinook_1
Question: Find the name of the genre that is most frequent across all tracks.
SQL: SELECT T1.Name FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId  =  T2.GenreId GROUP BY T2.GenreId ORDER BY COUNT(*) DESC LIMIT 1
Database: chinook_1
Question: What is the least common media type in all tracks?
SQL: SELECT T1.Name FROM MEDIATYPE AS T1 JOIN TRACK AS T2 ON T1.MediaTypeId  =  T2.MediaTypeId GROUP BY T2.MediaTypeId ORDER BY COUNT(*) ASC LIMIT 1
Database: chinook_1
Question: What is the name of the media type that is least common across all tracks?
SQL: SELECT T1.Name FROM MEDIATYPE AS T1 JOIN TRACK AS T2 ON T1.MediaTypeId  =  T2.MediaTypeId GROUP BY T2.MediaTypeId ORDER BY COUNT(*) ASC LIMIT 1
Database: chinook_1
Question: Show the album names and ids for albums that contain tracks with unit price bigger than 1.
SQL: SELECT T1.Title ,  T2.AlbumID FROM ALBUM AS T1 JOIN TRACK AS T2 ON T1.AlbumId  =  T2.AlbumId WHERE T2.UnitPrice  >  1 GROUP BY T2.AlbumID
Database: chinook_1
Question: What are the titles and ids for albums containing tracks with unit price greater than 1?
SQL: SELECT T1.Title ,  T2.AlbumID FROM ALBUM AS T1 JOIN TRACK AS T2 ON T1.AlbumId  =  T2.AlbumId WHERE T2.UnitPrice  >  1 GROUP BY T2.AlbumID
Database: chinook_1
Question: How many tracks belong to rock genre?
SQL: SELECT COUNT(*) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId  =  T2.GenreId WHERE T1.Name  =  "Rock"
Database: chinook_1
Question: Count the number of tracks that are part of the rock genre.
SQL: SELECT COUNT(*) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId  =  T2.GenreId WHERE T1.Name  =  "Rock"
Database: chinook_1
Question: What is the average unit price of tracks that belong to Jazz genre?
SQL: SELECT AVG(UnitPrice) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId  =  T2.GenreId WHERE T1.Name  =  "Jazz"
Database: chinook_1
Question: Find the average unit price of jazz tracks.
SQL: SELECT AVG(UnitPrice) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId  =  T2.GenreId WHERE T1.Name  =  "Jazz"
Database: chinook_1
Question: What is the first name and last name of the customer that has email "luisg@embraer.com.br"?
SQL: SELECT FirstName ,  LastName FROM CUSTOMER WHERE Email  =  "luisg@embraer.com.br"
Database: chinook_1
Question: Find the full name of the customer with the email "luisg@embraer.com.br".
SQL: SELECT FirstName ,  LastName FROM CUSTOMER WHERE Email  =  "luisg@embraer.com.br"
Database: chinook_1
Question: How many customers have email that contains "gmail.com"?
SQL: SELECT COUNT(*) FROM CUSTOMER WHERE Email LIKE "%gmail.com%"
Database: chinook_1
Question: Count the number of customers that have an email containing "gmail.com".
SQL: SELECT COUNT(*) FROM CUSTOMER WHERE Email LIKE "%gmail.com%"
Database: chinook_1
Question: What is the first name and last name employee helps the customer with first name Leonie?
SQL: SELECT T2.FirstName ,  T2.LastName FROM CUSTOMER AS T1 JOIN EMPLOYEE AS T2 ON T1.SupportRepId  =  T2.EmployeeId WHERE T1.FirstName  =  "Leonie"
Database: chinook_1
Question: Find the full names of employees who help customers with the first name Leonie.
SQL: SELECT T2.FirstName ,  T2.LastName FROM CUSTOMER AS T1 JOIN EMPLOYEE AS T2 ON T1.SupportRepId  =  T2.EmployeeId WHERE T1.FirstName  =  "Leonie"
Database: chinook_1
Question: What city does the employee who helps the customer with postal code 70174 live in?
SQL: SELECT T2.City FROM CUSTOMER AS T1 JOIN EMPLOYEE AS T2 ON T1.SupportRepId  =  T2.EmployeeId WHERE T1.PostalCode  =  "70174"
Database: chinook_1
Question: Find the cities corresponding to employees who help customers with the postal code 70174.
SQL: SELECT T2.City FROM CUSTOMER AS T1 JOIN EMPLOYEE AS T2 ON T1.SupportRepId  =  T2.EmployeeId WHERE T1.PostalCode  =  "70174"
Database: chinook_1
Question: How many distinct cities does the employees live in?
SQL: SELECT COUNT(DISTINCT city) FROM EMPLOYEE
Database: chinook_1
Question: Find the number of different cities that employees live in.
SQL: SELECT COUNT(DISTINCT city) FROM EMPLOYEE
Database: chinook_1
Question: Find all invoice dates corresponding to customers with first name Astrid and last name Gruber.
SQL: SELECT T2.InvoiceDate FROM CUSTOMER AS T1 JOIN INVOICE AS T2 ON T1.CustomerId  =  T2.CustomerId WHERE T1.FirstName  =  "Astrid" AND LastName  =  "Gruber"
Database: chinook_1
Question: What are the invoice dates for customers with the first name Astrid and the last name Gruber?
SQL: SELECT T2.InvoiceDate FROM CUSTOMER AS T1 JOIN INVOICE AS T2 ON T1.CustomerId  =  T2.CustomerId WHERE T1.FirstName  =  "Astrid" AND LastName  =  "Gruber"
Database: chinook_1
Question: Find all the customer last names that do not have invoice totals larger than 20.
SQL: SELECT LastName FROM CUSTOMER EXCEPT SELECT T1.LastName FROM CUSTOMER AS T1 JOIN Invoice AS T2 ON T1.CustomerId  =  T2.CustomerId WHERE T2.total  >  20
Database: chinook_1
Question: What are the last names of customers without invoice totals exceeding 20?
SQL: SELECT LastName FROM CUSTOMER EXCEPT SELECT T1.LastName FROM CUSTOMER AS T1 JOIN Invoice AS T2 ON T1.CustomerId  =  T2.CustomerId WHERE T2.total  >  20
Database: chinook_1
Question: Find the first names of all customers that live in Brazil and have an invoice.
SQL: SELECT DISTINCT T1.FirstName FROM CUSTOMER AS T1 JOIN INVOICE AS T2 ON T1.CustomerId  =  T2.CustomerId WHERE T1.country  =  "Brazil"
Database: chinook_1
Question: What are the different first names for customers from Brazil who have also had an invoice?
SQL: SELECT DISTINCT T1.FirstName FROM CUSTOMER AS T1 JOIN INVOICE AS T2 ON T1.CustomerId  =  T2.CustomerId WHERE T1.country  =  "Brazil"
Database: chinook_1
Question: Find the address of all customers that live in Germany and have invoice.
SQL: SELECT DISTINCT T1.Address FROM CUSTOMER AS T1 JOIN INVOICE AS T2 ON T1.CustomerId  =  T2.CustomerId WHERE T1.country  =  "Germany"
Database: chinook_1
Question: What are the addresses of customers living in Germany who have had an invoice?
SQL: SELECT DISTINCT T1.Address FROM CUSTOMER AS T1 JOIN INVOICE AS T2 ON T1.CustomerId  =  T2.CustomerId WHERE T1.country  =  "Germany"
Database: chinook_1
Question: List the phone numbers of all employees.
SQL: SELECT Phone FROM EMPLOYEE
Database: chinook_1
Question: What are the phone numbers for each employee?
SQL: SELECT Phone FROM EMPLOYEE
Database: chinook_1
Question: How many tracks are in the AAC audio file media type?
SQL: SELECT COUNT(*) FROM MEDIATYPE AS T1 JOIN TRACK AS T2 ON T1.MediaTypeId  =  T2.MediaTypeId WHERE T1.Name  =  "AAC audio file"
Database: chinook_1
Question: Count the number of tracks that are of the media type "AAC audio file".
SQL: SELECT COUNT(*) FROM MEDIATYPE AS T1 JOIN TRACK AS T2 ON T1.MediaTypeId  =  T2.MediaTypeId WHERE T1.Name  =  "AAC audio file"
Database: chinook_1
Question: What is the average duration in milliseconds of tracks that belong to Latin or Pop genre?
SQL: SELECT AVG(Milliseconds) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId  =  T2.GenreId WHERE T1.Name  =  "Latin" OR T1.Name  =  "Pop"
Database: chinook_1
Question: Find the average millisecond length of Latin and Pop tracks.
SQL: SELECT AVG(Milliseconds) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId  =  T2.GenreId WHERE T1.Name  =  "Latin" OR T1.Name  =  "Pop"
Database: chinook_1
Question: Please show the employee first names and ids of employees who serve at least 10 customers.
SQL: SELECT T1.FirstName ,  T1.SupportRepId FROM CUSTOMER AS T1 JOIN EMPLOYEE AS T2 ON T1.SupportRepId  =  T2.EmployeeId GROUP BY T1.SupportRepId HAVING COUNT(*)  >=  10
Database: chinook_1
Question: What are the first names and support rep ids for employees serving 10 or more customers?
SQL: SELECT T1.FirstName ,  T1.SupportRepId FROM CUSTOMER AS T1 JOIN EMPLOYEE AS T2 ON T1.SupportRepId  =  T2.EmployeeId GROUP BY T1.SupportRepId HAVING COUNT(*)  >=  10
Database: chinook_1
Question: Please show the employee last names that serves no more than 20 customers.
SQL: SELECT T1.LastName FROM CUSTOMER AS T1 JOIN EMPLOYEE AS T2 ON T1.SupportRepId  =  T2.EmployeeId GROUP BY T1.SupportRepId HAVING COUNT(*)  <=  20
Database: chinook_1
Question: What are the last names of employees who serve at most 20 customers?
SQL: SELECT T1.LastName FROM CUSTOMER AS T1 JOIN EMPLOYEE AS T2 ON T1.SupportRepId  =  T2.EmployeeId GROUP BY T1.SupportRepId HAVING COUNT(*)  <=  20
Database: chinook_1
Question: Please list all album titles in alphabetical order.
SQL: SELECT Title FROM ALBUM ORDER BY Title
Database: chinook_1
Question: What are all the album titles, in alphabetical order?
SQL: SELECT Title FROM ALBUM ORDER BY Title
Database: chinook_1
Question: Please list the name and id of all artists that have at least 3 albums in alphabetical order.
SQL: SELECT T2.Name ,  T1.ArtistId FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId  =  T2.ArtistID GROUP BY T1.ArtistId HAVING COUNT(*)  >=  3 ORDER BY T2.Name
Database: chinook_1
Question: What are the names and ids of artists with 3 or more albums, listed in alphabetical order?
SQL: SELECT T2.Name ,  T1.ArtistId FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId  =  T2.ArtistID GROUP BY T1.ArtistId HAVING COUNT(*)  >=  3 ORDER BY T2.Name
Database: chinook_1
Question: Find the names of artists that do not have any albums.
SQL: SELECT Name FROM ARTIST EXCEPT SELECT T2.Name FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId  =  T2.ArtistId
Database: chinook_1
Question: What are the names of artists who have not released any albums?
SQL: SELECT Name FROM ARTIST EXCEPT SELECT T2.Name FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId  =  T2.ArtistId
Database: chinook_1
Question: What is the average unit price of rock tracks?
SQL: SELECT AVG(T2.UnitPrice) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId  =  T2.GenreId WHERE T1.Name  =  "Rock"
Database: chinook_1
Question: Find the average unit price of tracks from the Rock genre.
SQL: SELECT AVG(T2.UnitPrice) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId  =  T2.GenreId WHERE T1.Name  =  "Rock"
Database: chinook_1
Question: What are the duration of the longest and shortest pop tracks in milliseconds?
SQL: SELECT max(Milliseconds) ,  min(Milliseconds) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId  =  T2.GenreId WHERE T1.Name  =  "Pop"
Database: chinook_1
Question: Find the maximum and minimum millisecond lengths of pop tracks.
SQL: SELECT max(Milliseconds) ,  min(Milliseconds) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId  =  T2.GenreId WHERE T1.Name  =  "Pop"
Database: chinook_1
Question: What are the birth dates of employees living in Edmonton?
SQL: SELECT BirthDate FROM EMPLOYEE WHERE City  =  "Edmonton"
Database: chinook_1
Question: Find the birth dates corresponding to employees who live in the city of Edmonton.
SQL: SELECT BirthDate FROM EMPLOYEE WHERE City  =  "Edmonton"
Database: chinook_1
Question: What are the distinct unit prices of all tracks?
SQL: SELECT distinct(UnitPrice) FROM TRACK
Database: chinook_1
Question: Find the distinct unit prices for tracks.
SQL: SELECT distinct(UnitPrice) FROM TRACK
Database: chinook_1
Question: How many artists do not have any album?
SQL: SELECT count(*) FROM ARTIST WHERE artistid NOT IN(SELECT artistid FROM ALBUM)
Database: chinook_1
Question: Cound the number of artists who have not released an album.
SQL: SELECT count(*) FROM ARTIST WHERE artistid NOT IN(SELECT artistid FROM ALBUM)
Database: chinook_1
Question: What are the album titles for albums containing both 'Reggae' and 'Rock' genre tracks?
SQL: SELECT T1.Title FROM Album AS T1 JOIN Track AS T2 ON T1.AlbumId  =  T2.AlbumId JOIN Genre AS T3 ON T2.GenreID  =  T3.GenreID WHERE T3.Name  =  'Reggae' INTERSECT SELECT T1.Title FROM Album AS T1 JOIN Track AS T2 ON T1.AlbumId  =  T2.AlbumId JOIN Genre AS T3 ON T2.GenreID  =  T3.GenreID WHERE T3.Name  =  'Rock'
Database: chinook_1
Question: Find the titles of albums that contain tracks of both the Reggae and Rock genres.
SQL: SELECT T1.Title FROM Album AS T1 JOIN Track AS T2 ON T1.AlbumId  =  T2.AlbumId JOIN Genre AS T3 ON T2.GenreID  =  T3.GenreID WHERE T3.Name  =  'Reggae' INTERSECT SELECT T1.Title FROM Album AS T1 JOIN Track AS T2 ON T1.AlbumId  =  T2.AlbumId JOIN Genre AS T3 ON T2.GenreID  =  T3.GenreID WHERE T3.Name  =  'Rock'
Database: insurance_fnol
Question: Find all the phone numbers.
SQL: SELECT customer_phone FROM available_policies
Database: insurance_fnol
Question: What are all the phone numbers?
SQL: SELECT customer_phone FROM available_policies
Database: insurance_fnol
Question: What are the customer phone numbers under the policy "Life Insurance"?
SQL: SELECT customer_phone FROM available_policies WHERE policy_type_code  =  "Life Insurance"
Database: insurance_fnol
Question: What are the phone numbers of customers using the policy with the code "Life Insurance"?
SQL: SELECT customer_phone FROM available_policies WHERE policy_type_code  =  "Life Insurance"
Database: insurance_fnol
Question: Which policy type has the most records in the database?
SQL: SELECT policy_type_code FROM available_policies GROUP BY policy_type_code ORDER BY count(*) DESC LIMIT 1
Database: insurance_fnol
Question: Which policy type appears most frequently in the available policies?
SQL: SELECT policy_type_code FROM available_policies GROUP BY policy_type_code ORDER BY count(*) DESC LIMIT 1
Database: insurance_fnol
Question: What are all the customer phone numbers under the most popular policy type?
SQL: SELECT customer_phone FROM available_policies WHERE policy_type_code  =  (SELECT policy_type_code FROM available_policies GROUP BY policy_type_code ORDER BY count(*) DESC LIMIT 1)
Database: insurance_fnol
Question: Find the phone numbers of customers using the most common policy type among the available policies.
SQL: SELECT customer_phone FROM available_policies WHERE policy_type_code  =  (SELECT policy_type_code FROM available_policies GROUP BY policy_type_code ORDER BY count(*) DESC LIMIT 1)
Database: insurance_fnol
Question: Find the policy type used by more than 4 customers.
SQL: SELECT policy_type_code FROM available_policies GROUP BY policy_type_code HAVING count(*)  >  4
Database: insurance_fnol
Question: Find the policy types more than 4 customers use. Show their type code.
SQL: SELECT policy_type_code FROM available_policies GROUP BY policy_type_code HAVING count(*)  >  4
Database: insurance_fnol
Question: Find the total and average amount of settlements.
SQL: SELECT sum(settlement_amount) ,  avg(settlement_amount) FROM settlements
Database: insurance_fnol
Question: Return the sum and average of all settlement amounts.
SQL: SELECT sum(settlement_amount) ,  avg(settlement_amount) FROM settlements
Database: insurance_fnol
Question: Find the name of services that have been used for more than 2 times in first notification of loss.
SQL: SELECT t2.service_name FROM first_notification_of_loss AS t1 JOIN services AS t2 ON t1.service_id  =  t2.service_id GROUP BY t1.service_id HAVING count(*)  >  2
Database: insurance_fnol
Question: Which services have been used more than twice in first notification of loss? Return the service name.
SQL: SELECT t2.service_name FROM first_notification_of_loss AS t1 JOIN services AS t2 ON t1.service_id  =  t2.service_id GROUP BY t1.service_id HAVING count(*)  >  2
Database: insurance_fnol
Question: What is the effective date of the claim that has the largest amount of total settlement?
SQL: SELECT t1.Effective_Date FROM claims AS t1 JOIN settlements AS t2 ON t1.claim_id  =  t2.claim_id GROUP BY t1.claim_id ORDER BY sum(t2.settlement_amount) DESC LIMIT 1
Database: insurance_fnol
Question: Find the claim that has the largest total settlement amount. Return the effective date of the claim.
SQL: SELECT t1.Effective_Date FROM claims AS t1 JOIN settlements AS t2 ON t1.claim_id  =  t2.claim_id GROUP BY t1.claim_id ORDER BY sum(t2.settlement_amount) DESC LIMIT 1
Database: insurance_fnol
Question: How many policies are listed for the customer named "Dayana Robel"?
SQL: SELECT count(*) FROM customers AS t1 JOIN customers_policies AS t2 ON t1.customer_id  =  t2.customer_id WHERE t1.customer_name  =  "Dayana Robel"
Database: insurance_fnol
Question: Count the total number of policies used by the customer named "Dayana Robel".
SQL: SELECT count(*) FROM customers AS t1 JOIN customers_policies AS t2 ON t1.customer_id  =  t2.customer_id WHERE t1.customer_name  =  "Dayana Robel"
Database: insurance_fnol
Question: What is the name of the customer who has the most policies listed?
SQL: SELECT t1.customer_name FROM customers AS t1 JOIN customers_policies AS t2 ON t1.customer_id  =  t2.customer_id GROUP BY t1.customer_name ORDER BY count(*) DESC LIMIT 1
Database: insurance_fnol
Question: Which customer uses the most policies? Give me the customer name.
SQL: SELECT t1.customer_name FROM customers AS t1 JOIN customers_policies AS t2 ON t1.customer_id  =  t2.customer_id GROUP BY t1.customer_name ORDER BY count(*) DESC LIMIT 1
Database: insurance_fnol
Question: What are all the policy types of the customer named "Dayana Robel"?
SQL: SELECT DISTINCT t3.policy_type_code FROM customers AS t1 JOIN customers_policies AS t2 ON t1.customer_id  =  t2.customer_id JOIN available_policies AS t3 ON t2.policy_id  =  t3.policy_id WHERE t1.customer_name  =  "Dayana Robel"
Database: insurance_fnol
Question: Tell me the types of the policy used by the customer named "Dayana Robel".
SQL: SELECT DISTINCT t3.policy_type_code FROM customers AS t1 JOIN customers_policies AS t2 ON t1.customer_id  =  t2.customer_id JOIN available_policies AS t3 ON t2.policy_id  =  t3.policy_id WHERE t1.customer_name  =  "Dayana Robel"
Database: insurance_fnol
Question: What are all the policy types of the customer that has the most policies listed?
SQL: SELECT DISTINCT t3.policy_type_code FROM customers AS t1 JOIN customers_policies AS t2 ON t1.customer_id  =  t2.customer_id JOIN available_policies AS t3 ON t2.policy_id  =  t3.policy_id WHERE t1.customer_name  =  (SELECT t1.customer_name FROM customers AS t1 JOIN customers_policies AS t2 ON t1.customer_id  =  t2.customer_id GROUP BY t1.customer_name ORDER BY count(*) DESC LIMIT 1)
Database: insurance_fnol
Question: List all the policy types used by the customer enrolled in the most policies.
SQL: SELECT DISTINCT t3.policy_type_code FROM customers AS t1 JOIN customers_policies AS t2 ON t1.customer_id  =  t2.customer_id JOIN available_policies AS t3 ON t2.policy_id  =  t3.policy_id WHERE t1.customer_name  =  (SELECT t1.customer_name FROM customers AS t1 JOIN customers_policies AS t2 ON t1.customer_id  =  t2.customer_id GROUP BY t1.customer_name ORDER BY count(*) DESC LIMIT 1)
Database: insurance_fnol
Question: List all the services in the alphabetical order.
SQL: SELECT service_name FROM services ORDER BY service_name
Database: insurance_fnol
Question: Give me a list of all the service names sorted alphabetically.
SQL: SELECT service_name FROM services ORDER BY service_name
Database: insurance_fnol
Question: How many services are there?
SQL: SELECT count(*) FROM services
Database: insurance_fnol
Question: Count the total number of available services.
SQL: SELECT count(*) FROM services
Database: insurance_fnol
Question: Find the names of users who do not have a first notification of loss record.
SQL: SELECT customer_name FROM customers EXCEPT SELECT t1.customer_name FROM customers AS t1 JOIN first_notification_of_loss AS t2 ON t1.customer_id  =  t2.customer_id
Database: insurance_fnol
Question: Which customers do not have a first notification of loss record? Give me the customer names.
SQL: SELECT customer_name FROM customers EXCEPT SELECT t1.customer_name FROM customers AS t1 JOIN first_notification_of_loss AS t2 ON t1.customer_id  =  t2.customer_id
Database: insurance_fnol
Question: Find the names of customers who have used either the service "Close a policy" or the service "Upgrade a policy".
SQL: SELECT t1.customer_name FROM customers AS t1 JOIN first_notification_of_loss AS t2 ON t1.customer_id  =  t2.customer_id JOIN services AS t3 ON t2.service_id  =  t3.service_id WHERE t3.service_name  =  "Close a policy" OR t3.service_name  =  "Upgrade a policy"
Database: insurance_fnol
Question: Which customers have used the service named "Close a policy" or "Upgrade a policy"? Give me the customer names.
SQL: SELECT t1.customer_name FROM customers AS t1 JOIN first_notification_of_loss AS t2 ON t1.customer_id  =  t2.customer_id JOIN services AS t3 ON t2.service_id  =  t3.service_id WHERE t3.service_name  =  "Close a policy" OR t3.service_name  =  "Upgrade a policy"
Database: insurance_fnol
Question: Find the names of customers who have used both the service "Close a policy" and the service "New policy application".
SQL: SELECT t1.customer_name FROM customers AS t1 JOIN first_notification_of_loss AS t2 ON t1.customer_id  =  t2.customer_id JOIN services AS t3 ON t2.service_id  =  t3.service_id WHERE t3.service_name  =  "Close a policy" INTERSECT SELECT t1.customer_name FROM customers AS t1 JOIN first_notification_of_loss AS t2 ON t1.customer_id  =  t2.customer_id JOIN services AS t3 ON t2.service_id  =  t3.service_id WHERE t3.service_name  =  "New policy application"
Database: insurance_fnol
Question: Which customers have used both the service named "Close a policy" and the service named "Upgrade a policy"? Give me the customer names.
SQL: SELECT t1.customer_name FROM customers AS t1 JOIN first_notification_of_loss AS t2 ON t1.customer_id  =  t2.customer_id JOIN services AS t3 ON t2.service_id  =  t3.service_id WHERE t3.service_name  =  "Close a policy" INTERSECT SELECT t1.customer_name FROM customers AS t1 JOIN first_notification_of_loss AS t2 ON t1.customer_id  =  t2.customer_id JOIN services AS t3 ON t2.service_id  =  t3.service_id WHERE t3.service_name  =  "New policy application"
Database: insurance_fnol
Question: Find the IDs of customers whose name contains "Diana".
SQL: SELECT customer_id FROM customers WHERE customer_name LIKE "%Diana%"
Database: insurance_fnol
Question: What are the IDs of customers who have "Diana" in part of their names?
SQL: SELECT customer_id FROM customers WHERE customer_name LIKE "%Diana%"
Database: insurance_fnol
Question: What are the maximum and minimum settlement amount on record?
SQL: SELECT max(settlement_amount) ,  min(settlement_amount) FROM settlements
Database: insurance_fnol
Question: Find the maximum and minimum settlement amount.
SQL: SELECT max(settlement_amount) ,  min(settlement_amount) FROM settlements
Database: insurance_fnol
Question: List all the customers in increasing order of IDs.
SQL: SELECT customer_id ,  customer_name FROM customers ORDER BY customer_id ASC
Database: insurance_fnol
Question: What is the ordered list of customer ids?
SQL: SELECT customer_id ,  customer_name FROM customers ORDER BY customer_id ASC
Database: insurance_fnol
Question: Retrieve the open and close dates of all the policies associated with the customer whose name contains "Diana"
SQL: SELECT t2.date_opened ,  t2.date_closed FROM customers AS t1 JOIN customers_policies AS t2 ON t1.customer_id  =  t2.customer_id WHERE t1.customer_name LIKE "%Diana%"
Database: insurance_fnol
Question: What are the open and close dates of all the policies used by the customer who have "Diana" in part of their names?
SQL: SELECT t2.date_opened ,  t2.date_closed FROM customers AS t1 JOIN customers_policies AS t2 ON t1.customer_id  =  t2.customer_id WHERE t1.customer_name LIKE "%Diana%"
Database: medicine_enzyme_interaction
Question: How many kinds of enzymes are there?
SQL: SELECT count(*) FROM enzyme
Database: medicine_enzyme_interaction
Question: What is the total count of enzymes?
SQL: SELECT count(*) FROM enzyme
Database: medicine_enzyme_interaction
Question: List the name of enzymes in descending lexicographical order.
SQL: SELECT name FROM enzyme ORDER BY name DESC
Database: medicine_enzyme_interaction
Question: What are the names of enzymes in descending order?
SQL: SELECT name FROM enzyme ORDER BY name DESC
Database: medicine_enzyme_interaction
Question: List the names and the locations that the enzymes can make an effect.
SQL: SELECT name ,  LOCATION FROM enzyme
Database: medicine_enzyme_interaction
Question: What are the names and locations of all enzymes listed?
SQL: SELECT name ,  LOCATION FROM enzyme
Database: medicine_enzyme_interaction
Question: What is the maximum Online Mendelian Inheritance in Man (OMIM) value of the enzymes?
SQL: SELECT max(OMIM) FROM enzyme
Database: medicine_enzyme_interaction
Question: What is the maximum OMIM value in the database?
SQL: SELECT max(OMIM) FROM enzyme
Database: medicine_enzyme_interaction
Question: What is the product, chromosome and porphyria related to the enzymes which take effect at the location 'Cytosol'?
SQL: SELECT product ,  chromosome ,  porphyria FROM enzyme WHERE LOCATION  =  'Cytosol'
Database: medicine_enzyme_interaction
Question: What is the product, chromosome, and porphyria of the enzymes located at 'Cytosol'?
SQL: SELECT product ,  chromosome ,  porphyria FROM enzyme WHERE LOCATION  =  'Cytosol'
Database: medicine_enzyme_interaction
Question: What are the names of enzymes who does not produce 'Heme'?
SQL: SELECT name FROM enzyme WHERE product != 'Heme'
Database: medicine_enzyme_interaction
Question: What are the names of enzymes whose product is not 'Heme'?
SQL: SELECT name FROM enzyme WHERE product != 'Heme'
Database: medicine_enzyme_interaction
Question: What are the names and trade names of the medicines which has 'Yes' value in the FDA record?
SQL: SELECT name ,  trade_name FROM medicine WHERE FDA_approved  =  'Yes'
Database: medicine_enzyme_interaction
Question: What are the names and trade names of the medcines that are FDA approved?
SQL: SELECT name ,  trade_name FROM medicine WHERE FDA_approved  =  'Yes'
Database: medicine_enzyme_interaction
Question: What are the names of enzymes in the medicine named 'Amisulpride' that can serve as an 'inhibitor'?
SQL: SELECT T1.name FROM enzyme AS T1 JOIN medicine_enzyme_interaction AS T2 ON T1.id  =  T2.enzyme_id JOIN medicine AS T3 ON T2.medicine_id  =  T3.id WHERE T3.name  =  'Amisulpride' AND T2.interaction_type  =  'inhibitor'
Database: medicine_enzyme_interaction
Question: What are the names of the enzymes used in the medicine  Amisulpride that acts as inhibitors?
SQL: SELECT T1.name FROM enzyme AS T1 JOIN medicine_enzyme_interaction AS T2 ON T1.id  =  T2.enzyme_id JOIN medicine AS T3 ON T2.medicine_id  =  T3.id WHERE T3.name  =  'Amisulpride' AND T2.interaction_type  =  'inhibitor'
Database: medicine_enzyme_interaction
Question: What are the ids and names of the medicine that can interact with two or more enzymes?
SQL: SELECT T1.id ,  T1.Name FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id  =  T1.id GROUP BY T1.id HAVING count(*)  >=  2
Database: medicine_enzyme_interaction
Question: For every medicine id, what are the names of the medicines that can interact with more than one enzyme?
SQL: SELECT T1.id ,  T1.Name FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id  =  T1.id GROUP BY T1.id HAVING count(*)  >=  2
Database: medicine_enzyme_interaction
Question: What are the ids, names and FDA approval status of medicines in descending order of the number of enzymes that it can interact with.
SQL: SELECT T1.id ,  T1.Name ,  T1.FDA_approved FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id  =  T1.id GROUP BY T1.id ORDER BY count(*) DESC
Database: medicine_enzyme_interaction
Question: What are the ids, names, and FDA approval status for medicines ordered by descending number of possible enzyme interactions?
SQL: SELECT T1.id ,  T1.Name ,  T1.FDA_approved FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id  =  T1.id GROUP BY T1.id ORDER BY count(*) DESC
Database: medicine_enzyme_interaction
Question: What is the id and name of the enzyme with most number of medicines that can interact as 'activator'?
SQL: SELECT T1.id ,  T1.name FROM enzyme AS T1 JOIN medicine_enzyme_interaction AS T2 ON T1.id  =  T2.enzyme_id WHERE T2.interaction_type  =  'activitor' GROUP BY T1.id ORDER BY count(*) DESC LIMIT 1
Database: medicine_enzyme_interaction
Question: What is the id and name of the enzyme that can interact with the most medicines as an activator?
SQL: SELECT T1.id ,  T1.name FROM enzyme AS T1 JOIN medicine_enzyme_interaction AS T2 ON T1.id  =  T2.enzyme_id WHERE T2.interaction_type  =  'activitor' GROUP BY T1.id ORDER BY count(*) DESC LIMIT 1
Database: medicine_enzyme_interaction
Question: What is the interaction type of the enzyme named 'ALA synthase' and the medicine named 'Aripiprazole'?
SQL: SELECT T1.interaction_type FROM medicine_enzyme_interaction AS T1 JOIN medicine AS T2 ON T1.medicine_id  =  T2.id JOIN enzyme AS T3 ON T1.enzyme_id  =  T3.id WHERE T3.name  =  'ALA synthase' AND T2.name  =  'Aripiprazole'
Database: medicine_enzyme_interaction
Question: What is the type of interaction for the enzyme named 'ALA synthase' and the medicine named 'Aripiprazole'?
SQL: SELECT T1.interaction_type FROM medicine_enzyme_interaction AS T1 JOIN medicine AS T2 ON T1.medicine_id  =  T2.id JOIN enzyme AS T3 ON T1.enzyme_id  =  T3.id WHERE T3.name  =  'ALA synthase' AND T2.name  =  'Aripiprazole'
Database: medicine_enzyme_interaction
Question: What is the most common interaction type between enzymes and medicine? And how many are there?
SQL: SELECT interaction_type ,  count(*) FROM medicine_enzyme_interaction GROUP BY interaction_type ORDER BY count(*) DESC LIMIT 1
Database: medicine_enzyme_interaction
Question: What are the most common types of interactions between enzymes and medicine, and how many types are there?
SQL: SELECT interaction_type ,  count(*) FROM medicine_enzyme_interaction GROUP BY interaction_type ORDER BY count(*) DESC LIMIT 1
Database: medicine_enzyme_interaction
Question: How many medicines have the FDA approval status 'No' ?
SQL: SELECT count(*) FROM medicine WHERE FDA_approved  =  'No'
Database: medicine_enzyme_interaction
Question: How many medicines were not approved by the FDA?
SQL: SELECT count(*) FROM medicine WHERE FDA_approved  =  'No'
Database: medicine_enzyme_interaction
Question: What is the id and trade name of the medicines can interact with at least 3 enzymes?
SQL: SELECT T1.id ,  T1.trade_name FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id  =  T1.id GROUP BY T1.id HAVING COUNT(*)  >=  3
Database: medicine_enzyme_interaction
Question: What are the ids and trade names of the medicine that can interact with at least 3 enzymes?
SQL: SELECT T1.id ,  T1.trade_name FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id  =  T1.id GROUP BY T1.id HAVING COUNT(*)  >=  3
Database: medicine_enzyme_interaction
Question: What are the distinct name, location and products of the enzymes which has any 'inhibitor' interaction?
SQL: SELECT DISTINCT T1.name ,  T1.location ,  T1.product FROM enzyme AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.enzyme_id  =  T1.id WHERE T2.interaction_type  =  'inhibitor'
Database: medicine_enzyme_interaction
Question: What are the different names, locations, and products of the enzymes that are capable inhibitor interactions?
SQL: SELECT DISTINCT T1.name ,  T1.location ,  T1.product FROM enzyme AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.enzyme_id  =  T1.id WHERE T2.interaction_type  =  'inhibitor'
Database: medicine_enzyme_interaction
Question: List the medicine name and trade name which can both interact as 'inhibitor' and 'activitor' with enzymes.
SQL: SELECT T1.name ,  T1.trade_name FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id  =  T1.id WHERE interaction_type  =  'inhibitor' INTERSECT SELECT T1.name ,  T1.trade_name FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id  =  T1.id WHERE interaction_type  =  'activitor'
Database: medicine_enzyme_interaction
Question: What are the medicine and trade names that can interact as an inhibitor and activitor with enzymes?
SQL: SELECT T1.name ,  T1.trade_name FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id  =  T1.id WHERE interaction_type  =  'inhibitor' INTERSECT SELECT T1.name ,  T1.trade_name FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id  =  T1.id WHERE interaction_type  =  'activitor'
Database: medicine_enzyme_interaction
Question: Show the medicine names and trade names that cannot interact with the enzyme with product 'Heme'.
SQL: SELECT name ,  trade_name FROM medicine EXCEPT SELECT T1.name ,  T1.trade_name FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id  =  T1.id JOIN enzyme AS T3 ON T3.id  =  T2.enzyme_id WHERE T3.product  =  'Protoporphyrinogen IX'
Database: medicine_enzyme_interaction
Question: What are the medicine and trade names that cannot interact with the enzyme with the product 'Heme'?
SQL: SELECT name ,  trade_name FROM medicine EXCEPT SELECT T1.name ,  T1.trade_name FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id  =  T1.id JOIN enzyme AS T3 ON T3.id  =  T2.enzyme_id WHERE T3.product  =  'Protoporphyrinogen IX'
Database: medicine_enzyme_interaction
Question: How many distinct FDA approval statuses are there for the medicines?
SQL: SELECT count(DISTINCT FDA_approved) FROM medicine
Database: medicine_enzyme_interaction
Question: How many different FDA approval statuses exist for medicines?
SQL: SELECT count(DISTINCT FDA_approved) FROM medicine
Database: medicine_enzyme_interaction
Question: Which enzyme names have the substring "ALA"?
SQL: SELECT name FROM enzyme WHERE name LIKE "%ALA%"
Database: medicine_enzyme_interaction
Question: What are the names of enzymes that include the string 'ALA'?
SQL: SELECT name FROM enzyme WHERE name LIKE "%ALA%"
Database: medicine_enzyme_interaction
Question: find the number of medicines offered by each trade.
SQL: SELECT trade_name ,  count(*) FROM medicine GROUP BY trade_name
Database: medicine_enzyme_interaction
Question: How many medicines are offered by each trade name?
SQL: SELECT trade_name ,  count(*) FROM medicine GROUP BY trade_name
Database: university_basketball
Question: List all schools and their nicknames in the order of founded year.
SQL: SELECT school ,  nickname FROM university ORDER BY founded
Database: university_basketball
Question: What are the different schools and their nicknames, ordered by their founding years?
SQL: SELECT school ,  nickname FROM university ORDER BY founded
Database: university_basketball
Question: List all public schools and their locations.
SQL: SELECT school ,  LOCATION FROM university WHERE affiliation  =  'Public'
Database: university_basketball
Question: What are the public schools and what are their locations?
SQL: SELECT school ,  LOCATION FROM university WHERE affiliation  =  'Public'
Database: university_basketball
Question: When was the school with the largest enrollment founded?
SQL: SELECT founded FROM university ORDER BY enrollment DESC LIMIT 1
Database: university_basketball
Question: Return the founded year for the school with the largest enrollment.
SQL: SELECT founded FROM university ORDER BY enrollment DESC LIMIT 1
Database: university_basketball
Question: Find the founded year of the newest non public school.
SQL: SELECT founded FROM university WHERE affiliation != 'Public' ORDER BY founded DESC LIMIT 1
Database: university_basketball
Question: What is the founded year of the non public school that was founded most recently?
SQL: SELECT founded FROM university WHERE affiliation != 'Public' ORDER BY founded DESC LIMIT 1
Database: university_basketball
Question: How many schools are in the basketball match?
SQL: SELECT count(DISTINCT school_id) FROM basketball_match
Database: university_basketball
Question: Count the number of schools that have had basketball matches.
SQL: SELECT count(DISTINCT school_id) FROM basketball_match
Database: university_basketball
Question: What is the highest acc percent score in the competition?
SQL: SELECT acc_percent FROM basketball_match ORDER BY acc_percent DESC LIMIT 1
Database: university_basketball
Question: Return the highest acc percent across all basketball matches.
SQL: SELECT acc_percent FROM basketball_match ORDER BY acc_percent DESC LIMIT 1
Database: university_basketball
Question: What is the primary conference of the school that has the lowest acc percent score in the competition?
SQL: SELECT t1.Primary_conference FROM university AS t1 JOIN basketball_match AS t2 ON t1.school_id  =  t2.school_id ORDER BY t2.acc_percent LIMIT 1
Database: university_basketball
Question: Return the primary conference of the school with the lowest acc percentage score.
SQL: SELECT t1.Primary_conference FROM university AS t1 JOIN basketball_match AS t2 ON t1.school_id  =  t2.school_id ORDER BY t2.acc_percent LIMIT 1
Database: university_basketball
Question: What is the team name and acc regular season score of the school that was founded for the longest time?
SQL: SELECT t2.team_name ,  t2.ACC_Regular_Season FROM university AS t1 JOIN basketball_match AS t2 ON t1.school_id  =  t2.school_id ORDER BY t1.founded LIMIT 1
Database: university_basketball
Question: Return the name of the team and the acc during the regular season for the school that was founded the earliest.
SQL: SELECT t2.team_name ,  t2.ACC_Regular_Season FROM university AS t1 JOIN basketball_match AS t2 ON t1.school_id  =  t2.school_id ORDER BY t1.founded LIMIT 1
Database: university_basketball
Question: Find the location and all games score of the school that has Clemson as its team name.
SQL: SELECT t2.All_Games ,  t1.location FROM university AS t1 JOIN basketball_match AS t2 ON t1.school_id  =  t2.school_id WHERE team_name  =  'Clemson'
Database: university_basketball
Question: What are the all games score and location of the school called Clemson?
SQL: SELECT t2.All_Games ,  t1.location FROM university AS t1 JOIN basketball_match AS t2 ON t1.school_id  =  t2.school_id WHERE team_name  =  'Clemson'
Database: university_basketball
Question: What are the average enrollment size of the universities that are founded before 1850?
SQL: SELECT avg(enrollment) FROM university WHERE founded  <  1850
Database: university_basketball
Question: Return the average enrollment of universities founded before 1850.
SQL: SELECT avg(enrollment) FROM university WHERE founded  <  1850
Database: university_basketball
Question: Show the enrollment and primary_conference of the oldest college.
SQL: SELECT enrollment ,  primary_conference FROM university ORDER BY founded LIMIT 1
Database: university_basketball
Question: What are the enrollment and primary conference for the university which was founded the earliest?
SQL: SELECT enrollment ,  primary_conference FROM university ORDER BY founded LIMIT 1
Database: university_basketball
Question: What is the total and minimum enrollment of all schools?
SQL: SELECT sum(enrollment) ,  min(enrollment) FROM university
Database: university_basketball
Question: Return the total and minimum enrollments across all schools.
SQL: SELECT sum(enrollment) ,  min(enrollment) FROM university
Database: university_basketball
Question: Find the total student enrollment for different affiliation type schools.
SQL: SELECT sum(enrollment) ,  affiliation FROM university GROUP BY affiliation
Database: university_basketball
Question: What are the total enrollments of universities of each affiliation type?
SQL: SELECT sum(enrollment) ,  affiliation FROM university GROUP BY affiliation
Database: university_basketball
Question: How many schools do not participate in the basketball match?
SQL: SELECT count(*) FROM university WHERE school_id NOT IN (SELECT school_id FROM basketball_match)
Database: university_basketball
Question: Count the number of universities that do not participate in the baketball match.
SQL: SELECT count(*) FROM university WHERE school_id NOT IN (SELECT school_id FROM basketball_match)
Database: university_basketball
Question: Find the schools that were either founded after 1850 or public.
SQL: SELECT school FROM university WHERE founded  >  1850 OR affiliation  =  'Public'
Database: university_basketball
Question: What are the schools that were either founded before 1850 or are public?
SQL: SELECT school FROM university WHERE founded  >  1850 OR affiliation  =  'Public'
Database: university_basketball
Question: Find how many different affiliation types there are.
SQL: SELECT count(DISTINCT affiliation) FROM university
Database: university_basketball
Question: Count the number of different affiliation types.
SQL: SELECT count(DISTINCT affiliation) FROM university
Database: university_basketball
Question: Find how many school locations have the word 'NY'.
SQL: SELECT count(*) FROM university WHERE LOCATION LIKE "%NY%"
Database: university_basketball
Question: How many universities have a location that contains NY?
SQL: SELECT count(*) FROM university WHERE LOCATION LIKE "%NY%"
Database: university_basketball
Question: Find the team names of the universities whose enrollments are smaller than the average enrollment size.
SQL: SELECT t2.team_name FROM university AS t1 JOIN basketball_match AS t2 ON t1.school_id  =  t2.school_id WHERE enrollment  <  (SELECT avg(enrollment) FROM university)
Database: university_basketball
Question: What are the names of teams from universities that have a below average enrollment?
SQL: SELECT t2.team_name FROM university AS t1 JOIN basketball_match AS t2 ON t1.school_id  =  t2.school_id WHERE enrollment  <  (SELECT avg(enrollment) FROM university)
Database: university_basketball
Question: Find the number of universities that have over a 20000 enrollment size for each affiliation type.
SQL: SELECT count(*) ,  affiliation FROM university WHERE enrollment  >  20000 GROUP BY affiliation
Database: university_basketball
Question: What are the different affiliations, and how many schools with each have an enrollment size of above 20000?
SQL: SELECT count(*) ,  affiliation FROM university WHERE enrollment  >  20000 GROUP BY affiliation
Database: university_basketball
Question: Find the total number of students enrolled in the colleges that were founded after the year of 1850 for each affiliation type.
SQL: SELECT sum(Enrollment) ,  affiliation FROM university WHERE founded  >  1850 GROUP BY affiliation
Database: university_basketball
Question: What are the different affiliations, and what is the total enrollment of schools founded after 1850 for each enrollment type?
SQL: SELECT sum(Enrollment) ,  affiliation FROM university WHERE founded  >  1850 GROUP BY affiliation
Database: university_basketball
Question: What is the maximum enrollment across all schools?
SQL: SELECT max(Enrollment) FROM university
Database: university_basketball
Question: Return the maximum enrollment across all schools.
SQL: SELECT max(Enrollment) FROM university
Database: university_basketball
Question: List all information regarding the basketball match.
SQL: SELECT * FROM basketball_match
Database: university_basketball
Question: What is all the information about the basketball match?
SQL: SELECT * FROM basketball_match
Database: university_basketball
Question: List names of all teams in the basketball competition, ordered by all home scores in descending order.
SQL: SELECT team_name FROM basketball_match ORDER BY All_Home DESC
Database: university_basketball
Question: What are the names of all the teams in the basketball competition, sorted by all home scores in descending order?
SQL: SELECT team_name FROM basketball_match ORDER BY All_Home DESC
Database: phone_1
Question: List the hardware model name for the phones that were produced by "Nokia Corporation" or whose screen mode type is "Graphics."
SQL: SELECT DISTINCT T2.Hardware_Model_name FROM screen_mode AS T1 JOIN phone AS T2 ON T1.Graphics_mode = T2.screen_mode WHERE T1.Type  =  "Graphics" OR t2.Company_name  =  "Nokia Corporation"
Database: phone_1
Question: Find the number of phones for each accreditation type.
SQL: SELECT Accreditation_type ,  count(*) FROM phone GROUP BY Accreditation_type
Database: phone_1
Question: How many phones belongs to each accreditation type?
SQL: SELECT Accreditation_type ,  count(*) FROM phone GROUP BY Accreditation_type
Database: phone_1
Question: Find the accreditation level that more than 3 phones use.
SQL: SELECT Accreditation_level FROM phone GROUP BY Accreditation_level HAVING count(*)  >  3
Database: phone_1
Question: Find the details for all chip models.
SQL: SELECT * FROM chip_model
Database: phone_1
Question: How many models do not have the wifi function?
SQL: SELECT count(*) FROM chip_model WHERE wifi  =  'No'
Database: phone_1
Question: Count the number of chip model that do not have wifi.
SQL: SELECT count(*) FROM chip_model WHERE wifi  =  'No'
Database: phone_1
Question: List all the model names sorted by their launch year.
SQL: SELECT model_name FROM chip_model ORDER BY launch_year
Database: phone_1
Question: Find the average ram mib size of the chip models that are never used by any phone.
SQL: SELECT avg(RAM_MiB) FROM chip_model WHERE model_name NOT IN (SELECT chip_model FROM phone)
Database: phone_1
Question: Find the names of the chip models that are not used by any phone with full accreditation type.
SQL: SELECT model_name FROM chip_model EXCEPT SELECT chip_model FROM phone WHERE Accreditation_type  =  'Full'
Database: phone_1
Question: Find the pixels of the screen modes that are used by both phones with full accreditation types and phones with Provisional accreditation types.
SQL: SELECT t1.pixels FROM screen_mode AS t1 JOIN phone AS t2 ON t1.Graphics_mode  =  t2.screen_mode WHERE t2.Accreditation_type  =  'Provisional' INTERSECT SELECT t1.pixels FROM screen_mode AS t1 JOIN phone AS t2 ON t1.Graphics_mode  =  t2.screen_mode WHERE t2.Accreditation_type  =  'Full'
Database: match_season
Question: How many countries are there in total?
SQL: SELECT count(*) FROM country
Database: match_season
Question: Count the number of countries.
SQL: SELECT count(*) FROM country
Database: match_season
Question: Show the country name and capital of all countries.
SQL: SELECT Country_name ,  Capital FROM country
Database: match_season
Question: What are the names and capitals of each country?
SQL: SELECT Country_name ,  Capital FROM country
Database: match_season
Question: Show all official native languages that contain the word "English".
SQL: SELECT Official_native_language FROM country WHERE Official_native_language LIKE "%English%"
Database: match_season
Question: What are the official native languages that contain the string "English".
SQL: SELECT Official_native_language FROM country WHERE Official_native_language LIKE "%English%"
Database: match_season
Question: Show all distinct positions of matches.
SQL: SELECT DISTINCT POSITION FROM match_season
Database: match_season
Question: What are the different positions for match season?
SQL: SELECT DISTINCT POSITION FROM match_season
Database: match_season
Question: Show the players from college UCLA.
SQL: SELECT Player FROM match_season WHERE College  =  "UCLA"
Database: match_season
Question: Who are the players from UCLA?
SQL: SELECT Player FROM match_season WHERE College  =  "UCLA"
Database: match_season
Question: Show the distinct position of players from college UCLA or Duke.
SQL: SELECT DISTINCT POSITION FROM match_season WHERE College  =  "UCLA" OR College  =  "Duke"
Database: match_season
Question: What are the different positions of players from UCLA or Duke colleges?
SQL: SELECT DISTINCT POSITION FROM match_season WHERE College  =  "UCLA" OR College  =  "Duke"
Database: match_season
Question: Show the draft pick numbers and draft classes of players whose positions are defenders.
SQL: SELECT Draft_Pick_Number ,  Draft_Class FROM match_season WHERE POSITION  =  "Defender"
Database: match_season
Question: What are the draft pick numbers and draft classes for players who play the Defender position?
SQL: SELECT Draft_Pick_Number ,  Draft_Class FROM match_season WHERE POSITION  =  "Defender"
Database: match_season
Question: How many distinct teams are involved in match seasons?
SQL: SELECT count(DISTINCT Team) FROM match_season
Database: match_season
Question: Count the number of different teams involved in match season.
SQL: SELECT count(DISTINCT Team) FROM match_season
Database: match_season
Question: Show the players and the years played.
SQL: SELECT Player ,  Years_Played FROM player
Database: match_season
Question: Who are the different players and how many years has each played?
SQL: SELECT Player ,  Years_Played FROM player
Database: match_season
Question: Show all team names.
SQL: SELECT Name FROM Team
Database: match_season
Question: What are the names of all teams?
SQL: SELECT Name FROM Team