target-benchmark/spider-queries huggingface dataset:
Database: chinook_1 (tables: track, mediatype)
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 (tables: track, mediatype)
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 (tables: genre, track)
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 (tables: genre, track)
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 (tables: employee, customer)
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 (tables: employee, customer)
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 (tables: employee, customer)
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 (tables: employee, customer)
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 (tables: album)
Question: Please list all album titles in alphabetical order.
SQL: SELECT Title FROM ALBUM ORDER BY Title
Database: chinook_1 (tables: album)
Question: What are all the album titles, in alphabetical order?
SQL: SELECT Title FROM ALBUM ORDER BY Title
Database: chinook_1 (tables: artist, album)
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 (tables: artist, album)
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 (tables: artist, album)
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 (tables: artist, album)
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 (tables: genre, track)
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 (tables: genre, track)
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 (tables: genre, track)
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 (tables: genre, track)
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 (tables: employee)
Question: What are the birth dates of employees living in Edmonton?
SQL: SELECT BirthDate FROM EMPLOYEE WHERE City  =  "Edmonton"
Database: chinook_1 (tables: employee)
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 (tables: track)
Question: What are the distinct unit prices of all tracks?
SQL: SELECT distinct(UnitPrice) FROM TRACK
Database: chinook_1 (tables: track)
Question: Find the distinct unit prices for tracks.
SQL: SELECT distinct(UnitPrice) FROM TRACK
Database: chinook_1 (tables: artist, album)
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 (tables: artist, album)
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 (tables: track, album, genre)
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 (tables: track, album, genre)
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 (tables: available_policies)
Question: Find all the phone numbers.
SQL: SELECT customer_phone FROM available_policies
Database: insurance_fnol (tables: available_policies)
Question: What are all the phone numbers?
SQL: SELECT customer_phone FROM available_policies
Database: insurance_fnol (tables: available_policies)
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 (tables: available_policies)
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 (tables: available_policies)
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 (tables: available_policies)
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 (tables: available_policies)
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 (tables: available_policies)
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 (tables: available_policies)
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 (tables: available_policies)
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 (tables: settlements)
Question: Find the total and average amount of settlements.
SQL: SELECT sum(settlement_amount) ,  avg(settlement_amount) FROM settlements
Database: insurance_fnol (tables: settlements)
Question: Return the sum and average of all settlement amounts.
SQL: SELECT sum(settlement_amount) ,  avg(settlement_amount) FROM settlements
Database: insurance_fnol (tables: first_notification_of_loss, services)
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 (tables: first_notification_of_loss, services)
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 (tables: claims, settlements)
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 (tables: claims, settlements)
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 (tables: customers, customers_policies)
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 (tables: customers, customers_policies)
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 (tables: customers, customers_policies)
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 (tables: customers, customers_policies)
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 (tables: available_policies, customers, customers_policies)
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 (tables: available_policies, customers, customers_policies)
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 (tables: available_policies, customers, customers_policies)
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 (tables: available_policies, customers, customers_policies)
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 (tables: services)
Question: List all the services in the alphabetical order.
SQL: SELECT service_name FROM services ORDER BY service_name
Database: insurance_fnol (tables: services)
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 (tables: services)
Question: How many services are there?
SQL: SELECT count(*) FROM services
Database: insurance_fnol (tables: services)
Question: Count the total number of available services.
SQL: SELECT count(*) FROM services
Database: insurance_fnol (tables: first_notification_of_loss, customers)
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 (tables: first_notification_of_loss, customers)
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 (tables: first_notification_of_loss, customers, services)
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 (tables: first_notification_of_loss, customers, services)
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 (tables: first_notification_of_loss, customers, services)
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 (tables: first_notification_of_loss, customers, services)
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 (tables: customers)
Question: Find the IDs of customers whose name contains "Diana".
SQL: SELECT customer_id FROM customers WHERE customer_name LIKE "%Diana%"
Database: insurance_fnol (tables: customers)
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 (tables: settlements)
Question: What are the maximum and minimum settlement amount on record?
SQL: SELECT max(settlement_amount) ,  min(settlement_amount) FROM settlements
Database: insurance_fnol (tables: settlements)
Question: Find the maximum and minimum settlement amount.
SQL: SELECT max(settlement_amount) ,  min(settlement_amount) FROM settlements
Database: insurance_fnol (tables: customers)
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 (tables: customers)
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 (tables: customers, customers_policies)
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 (tables: customers, customers_policies)
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 (tables: enzyme)
Question: How many kinds of enzymes are there?
SQL: SELECT count(*) FROM enzyme
Database: medicine_enzyme_interaction (tables: enzyme)
Question: What is the total count of enzymes?
SQL: SELECT count(*) FROM enzyme
Database: medicine_enzyme_interaction (tables: enzyme)
Question: List the name of enzymes in descending lexicographical order.
SQL: SELECT name FROM enzyme ORDER BY name DESC
Database: medicine_enzyme_interaction (tables: enzyme)
Question: What are the names of enzymes in descending order?
SQL: SELECT name FROM enzyme ORDER BY name DESC
Database: medicine_enzyme_interaction (tables: enzyme)
Question: List the names and the locations that the enzymes can make an effect.
SQL: SELECT name ,  LOCATION FROM enzyme
Database: medicine_enzyme_interaction (tables: enzyme)
Question: What are the names and locations of all enzymes listed?
SQL: SELECT name ,  LOCATION FROM enzyme
Database: medicine_enzyme_interaction (tables: enzyme)
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 (tables: enzyme)
Question: What is the maximum OMIM value in the database?
SQL: SELECT max(OMIM) FROM enzyme
Database: medicine_enzyme_interaction (tables: enzyme)
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 (tables: enzyme)
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 (tables: enzyme)
Question: What are the names of enzymes who does not produce 'Heme'?
SQL: SELECT name FROM enzyme WHERE product != 'Heme'
Database: medicine_enzyme_interaction (tables: enzyme)
Question: What are the names of enzymes whose product is not 'Heme'?
SQL: SELECT name FROM enzyme WHERE product != 'Heme'
Database: medicine_enzyme_interaction (tables: medicine)
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 (tables: medicine)
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 (tables: medicine_enzyme_interaction, medicine, enzyme)
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 (tables: medicine_enzyme_interaction, medicine, enzyme)
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 (tables: medicine, 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 (tables: medicine, 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 (tables: medicine, 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 (tables: medicine, 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