cnatale/presto-athena-txt-2-sql huggingface dataset:
Return the sum and average of all settlement amounts.
Additional table information: table: insurance_fnol
SQL: SELECT SUM(settlement_amount), AVG(settlement_amount) FROM settlements
Find the name of services that have been used for more than 2 times in first notification of loss.
Additional table information: table: insurance_fnol
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
Which services have been used more than twice in first notification of loss? Return the service name.
Additional table information: table: insurance_fnol
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
What is the effective date of the claim that has the largest amount of total settlement?
Additional table information: table: insurance_fnol
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
Find the claim that has the largest total settlement amount. Return the effective date of the claim.
Additional table information: table: insurance_fnol
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
How many policies are listed for the customer named 'Dayana Robel'?
Additional table information: table: insurance_fnol
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'
Count the total number of policies used by the customer named 'Dayana Robel'.
Additional table information: table: insurance_fnol
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'
What is the name of the customer who has the most policies listed?
Additional table information: table: insurance_fnol
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
Which customer uses the most policies? Give me the customer name.
Additional table information: table: insurance_fnol
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
What are all the policy types of the customer named 'Dayana Robel'?
Additional table information: table: insurance_fnol
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'
Tell me the types of the policy used by the customer named 'Dayana Robel'.
Additional table information: table: insurance_fnol
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'
What are all the policy types of the customer that has the most policies listed?
Additional table information: table: insurance_fnol
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)
List all the policy types used by the customer enrolled in the most policies.
Additional table information: table: insurance_fnol
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)
List all the services in the alphabetical order.
Additional table information: table: insurance_fnol
SQL: SELECT service_name FROM services ORDER BY service_name NULLS FIRST
Give me a list of all the service names sorted alphabetically.
Additional table information: table: insurance_fnol
SQL: SELECT service_name FROM services ORDER BY service_name NULLS FIRST
How many services are there?
Additional table information: table: insurance_fnol
SQL: SELECT COUNT(*) FROM services
Count the total number of available services.
Additional table information: table: insurance_fnol
SQL: SELECT COUNT(*) FROM services
Find the names of users who do not have a first notification of loss record.
Additional table information: table: insurance_fnol
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
Which customers do not have a first notification of loss record? Give me the customer names.
Additional table information: table: insurance_fnol
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
Find the names of customers who have used either the service 'Close a policy' or the service 'Upgrade a policy'.
Additional table information: table: insurance_fnol
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'
Which customers have used the service named 'Close a policy' or 'Upgrade a policy'? Give me the customer names.
Additional table information: table: insurance_fnol
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'
Find the names of customers who have used both the service 'Close a policy' and the service 'New policy application'.
Additional table information: table: insurance_fnol
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'
Which customers have used both the service named 'Close a policy' and the service named 'Upgrade a policy'? Give me the customer names.
Additional table information: table: insurance_fnol
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'
Find the IDs of customers whose name contains 'Diana'.
Additional table information: table: insurance_fnol
SQL: SELECT customer_id FROM customers WHERE customer_name LIKE '%Diana%'
What are the IDs of customers who have 'Diana' in part of their names?
Additional table information: table: insurance_fnol
SQL: SELECT customer_id FROM customers WHERE customer_name LIKE '%Diana%'
What are the maximum and minimum settlement amount on record?
Additional table information: table: insurance_fnol
SQL: SELECT MAX(settlement_amount), MIN(settlement_amount) FROM settlements
Find the maximum and minimum settlement amount.
Additional table information: table: insurance_fnol
SQL: SELECT MAX(settlement_amount), MIN(settlement_amount) FROM settlements
List all the customers in increasing order of IDs.
Additional table information: table: insurance_fnol
SQL: SELECT customer_id, customer_name FROM customers ORDER BY customer_id ASC NULLS FIRST
What is the ordered list of customer ids?
Additional table information: table: insurance_fnol
SQL: SELECT customer_id, customer_name FROM customers ORDER BY customer_id ASC NULLS FIRST
Retrieve the open and close dates of all the policies associated with the customer whose name contains 'Diana'
Additional table information: table: insurance_fnol
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%'
What are the open and close dates of all the policies used by the customer who have 'Diana' in part of their names?
Additional table information: table: insurance_fnol
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%'
How many kinds of enzymes are there?
Additional table information: table: medicine_enzyme_interaction
SQL: SELECT COUNT(*) FROM enzyme
What is the total count of enzymes?
Additional table information: table: medicine_enzyme_interaction
SQL: SELECT COUNT(*) FROM enzyme
List the name of enzymes in descending lexicographical order.
Additional table information: table: medicine_enzyme_interaction
SQL: SELECT name FROM enzyme ORDER BY name DESC
What are the names of enzymes in descending order?
Additional table information: table: medicine_enzyme_interaction
SQL: SELECT name FROM enzyme ORDER BY name DESC
List the names and the locations that the enzymes can make an effect.
Additional table information: table: medicine_enzyme_interaction
SQL: SELECT name, LOCATION FROM enzyme
What are the names and locations of all enzymes listed?
Additional table information: table: medicine_enzyme_interaction
SQL: SELECT name, LOCATION FROM enzyme
What is the maximum Online Mendelian Inheritance in Man (OMIM) value of the enzymes?
Additional table information: table: medicine_enzyme_interaction
SQL: SELECT MAX(OMIM) FROM enzyme
What is the maximum OMIM value in the database?
Additional table information: table: medicine_enzyme_interaction
SQL: SELECT MAX(OMIM) FROM enzyme
What is the product, chromosome and porphyria related to the enzymes which take effect at the location 'Cytosol'?
Additional table information: table: medicine_enzyme_interaction
SQL: SELECT product, chromosome, porphyria FROM enzyme WHERE LOCATION = 'Cytosol'
What is the product, chromosome, and porphyria of the enzymes located at 'Cytosol'?
Additional table information: table: medicine_enzyme_interaction
SQL: SELECT product, chromosome, porphyria FROM enzyme WHERE LOCATION = 'Cytosol'
What are the names of enzymes who does not produce 'Heme'?
Additional table information: table: medicine_enzyme_interaction
SQL: SELECT name FROM enzyme WHERE product <> 'Heme'
What are the names of enzymes whose product is not 'Heme'?
Additional table information: table: medicine_enzyme_interaction
SQL: SELECT name FROM enzyme WHERE product <> 'Heme'
What are the names and trade names of the medicines which has 'Yes' value in the FDA record?
Additional table information: table: medicine_enzyme_interaction
SQL: SELECT name, trade_name FROM medicine WHERE FDA_approved = 'Yes'
What are the names and trade names of the medcines that are FDA approved?
Additional table information: table: medicine_enzyme_interaction
SQL: SELECT name, trade_name FROM medicine WHERE FDA_approved = 'Yes'
What are the names of enzymes in the medicine named 'Amisulpride' that can serve as an 'inhibitor'?
Additional table information: table: medicine_enzyme_interaction
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'
What are the names of the enzymes used in the medicine  Amisulpride that acts as inhibitors?
Additional table information: table: medicine_enzyme_interaction
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'
What are the ids and names of the medicine that can interact with two or more enzymes?
Additional table information: table: medicine_enzyme_interaction
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
For every medicine id, what are the names of the medicines that can interact with more than one enzyme?
Additional table information: table: medicine_enzyme_interaction
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
What are the ids, names and FDA approval status of medicines in descending order of the number of enzymes that it can interact with.
Additional table information: table: medicine_enzyme_interaction
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
What are the ids, names, and FDA approval status for medicines ordered by descending number of possible enzyme interactions?
Additional table information: table: medicine_enzyme_interaction
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
What is the id and name of the enzyme with most number of medicines that can interact as 'activator'?
Additional table information: table: medicine_enzyme_interaction
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
What is the id and name of the enzyme that can interact with the most medicines as an activator?
Additional table information: table: medicine_enzyme_interaction
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
What is the interaction type of the enzyme named 'ALA synthase' and the medicine named 'Aripiprazole'?
Additional table information: table: medicine_enzyme_interaction
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'
What is the type of interaction for the enzyme named 'ALA synthase' and the medicine named 'Aripiprazole'?
Additional table information: table: medicine_enzyme_interaction
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'
What is the most common interaction type between enzymes and medicine? And how many are there?
Additional table information: table: medicine_enzyme_interaction
SQL: SELECT interaction_type, COUNT(*) FROM medicine_enzyme_interaction GROUP BY interaction_type ORDER BY COUNT(*) DESC LIMIT 1
What are the most common types of interactions between enzymes and medicine, and how many types are there?
Additional table information: table: medicine_enzyme_interaction
SQL: SELECT interaction_type, COUNT(*) FROM medicine_enzyme_interaction GROUP BY interaction_type ORDER BY COUNT(*) DESC LIMIT 1
How many medicines have the FDA approval status 'No' ?
Additional table information: table: medicine_enzyme_interaction
SQL: SELECT COUNT(*) FROM medicine WHERE FDA_approved = 'No'
How many medicines were not approved by the FDA?
Additional table information: table: medicine_enzyme_interaction
SQL: SELECT COUNT(*) FROM medicine WHERE FDA_approved = 'No'
How many enzymes do not have any interactions?
Additional table information: table: medicine_enzyme_interaction
SQL: SELECT COUNT(*) FROM enzyme WHERE NOT id IN (SELECT enzyme_id FROM medicine_enzyme_interaction)
What is the count of enzymes without any interactions?
Additional table information: table: medicine_enzyme_interaction
SQL: SELECT COUNT(*) FROM enzyme WHERE NOT id IN (SELECT enzyme_id FROM medicine_enzyme_interaction)
What is the id and trade name of the medicines can interact with at least 3 enzymes?
Additional table information: table: medicine_enzyme_interaction
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
What are the ids and trade names of the medicine that can interact with at least 3 enzymes?
Additional table information: table: medicine_enzyme_interaction
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
What are the distinct name, location and products of the enzymes which has any 'inhibitor' interaction?
Additional table information: table: medicine_enzyme_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'
What are the different names, locations, and products of the enzymes that are capable inhibitor interactions?
Additional table information: table: medicine_enzyme_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'
List the medicine name and trade name which can both interact as 'inhibitor' and 'activitor' with enzymes.
Additional table information: table: medicine_enzyme_interaction
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'
What are the medicine and trade names that can interact as an inhibitor and activitor with enzymes?
Additional table information: table: medicine_enzyme_interaction
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'
Show the medicine names and trade names that cannot interact with the enzyme with product 'Heme'.
Additional table information: table: medicine_enzyme_interaction
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'
What are the medicine and trade names that cannot interact with the enzyme with the product 'Heme'?
Additional table information: table: medicine_enzyme_interaction
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'
How many distinct FDA approval statuses are there for the medicines?
Additional table information: table: medicine_enzyme_interaction
SQL: SELECT COUNT(DISTINCT FDA_approved) FROM medicine
How many different FDA approval statuses exist for medicines?
Additional table information: table: medicine_enzyme_interaction
SQL: SELECT COUNT(DISTINCT FDA_approved) FROM medicine
Which enzyme names have the substring 'ALA'?
Additional table information: table: medicine_enzyme_interaction
SQL: SELECT name FROM enzyme WHERE name LIKE '%ALA%'
What are the names of enzymes that include the string 'ALA'?
Additional table information: table: medicine_enzyme_interaction
SQL: SELECT name FROM enzyme WHERE name LIKE '%ALA%'
find the number of medicines offered by each trade.
Additional table information: table: medicine_enzyme_interaction
SQL: SELECT trade_name, COUNT(*) FROM medicine GROUP BY trade_name
How many medicines are offered by each trade name?
Additional table information: table: medicine_enzyme_interaction
SQL: SELECT trade_name, COUNT(*) FROM medicine GROUP BY trade_name
List all schools and their nicknames in the order of founded year.
Additional table information: table: university_basketball
SQL: SELECT school, nickname FROM university ORDER BY founded NULLS FIRST
What are the different schools and their nicknames, ordered by their founding years?
Additional table information: table: university_basketball
SQL: SELECT school, nickname FROM university ORDER BY founded NULLS FIRST
List all public schools and their locations.
Additional table information: table: university_basketball
SQL: SELECT school, LOCATION FROM university WHERE affiliation = 'Public'
What are the public schools and what are their locations?
Additional table information: table: university_basketball
SQL: SELECT school, LOCATION FROM university WHERE affiliation = 'Public'
When was the school with the largest enrollment founded?
Additional table information: table: university_basketball
SQL: SELECT founded FROM university ORDER BY enrollment DESC LIMIT 1
Return the founded year for the school with the largest enrollment.
Additional table information: table: university_basketball
SQL: SELECT founded FROM university ORDER BY enrollment DESC LIMIT 1
Find the founded year of the newest non public school.
Additional table information: table: university_basketball
SQL: SELECT founded FROM university WHERE affiliation <> 'Public' ORDER BY founded DESC LIMIT 1
What is the founded year of the non public school that was founded most recently?
Additional table information: table: university_basketball
SQL: SELECT founded FROM university WHERE affiliation <> 'Public' ORDER BY founded DESC LIMIT 1
How many schools are in the basketball match?
Additional table information: table: university_basketball
SQL: SELECT COUNT(DISTINCT school_id) FROM basketball_match
Count the number of schools that have had basketball matches.
Additional table information: table: university_basketball
SQL: SELECT COUNT(DISTINCT school_id) FROM basketball_match
What is the highest acc percent score in the competition?
Additional table information: table: university_basketball
SQL: SELECT acc_percent FROM basketball_match ORDER BY acc_percent DESC LIMIT 1
Return the highest acc percent across all basketball matches.
Additional table information: table: university_basketball
SQL: SELECT acc_percent FROM basketball_match ORDER BY acc_percent DESC LIMIT 1
What is the primary conference of the school that has the lowest acc percent score in the competition?
Additional table information: table: university_basketball
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 NULLS FIRST LIMIT 1
Return the primary conference of the school with the lowest acc percentage score.
Additional table information: table: university_basketball
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 NULLS FIRST LIMIT 1
What is the team name and acc regular season score of the school that was founded for the longest time?
Additional table information: table: university_basketball
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 NULLS FIRST LIMIT 1
Return the name of the team and the acc during the regular season for the school that was founded the earliest.
Additional table information: table: university_basketball
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 NULLS FIRST LIMIT 1
Find the location and all games score of the school that has Clemson as its team name.
Additional table information: table: university_basketball
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'
What are the all games score and location of the school called Clemson?
Additional table information: table: university_basketball
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'
What are the average enrollment size of the universities that are founded before 1850?
Additional table information: table: university_basketball
SQL: SELECT AVG(enrollment) FROM university WHERE founded < 1850
Return the average enrollment of universities founded before 1850.
Additional table information: table: university_basketball
SQL: SELECT AVG(enrollment) FROM university WHERE founded < 1850
Show the enrollment and primary_conference of the oldest college.
Additional table information: table: university_basketball
SQL: SELECT enrollment, primary_conference FROM university ORDER BY founded NULLS FIRST LIMIT 1
What are the enrollment and primary conference for the university which was founded the earliest?
Additional table information: table: university_basketball
SQL: SELECT enrollment, primary_conference FROM university ORDER BY founded NULLS FIRST LIMIT 1
What is the total and minimum enrollment of all schools?
Additional table information: table: university_basketball
SQL: SELECT SUM(enrollment), MIN(enrollment) FROM university
Return the total and minimum enrollments across all schools.
Additional table information: table: university_basketball
SQL: SELECT SUM(enrollment), MIN(enrollment) FROM university
Find the total student enrollment for different affiliation type schools.
Additional table information: table: university_basketball
SQL: SELECT SUM(enrollment), affiliation FROM university GROUP BY affiliation
What are the total enrollments of universities of each affiliation type?
Additional table information: table: university_basketball
SQL: SELECT SUM(enrollment), affiliation FROM university GROUP BY affiliation
How many schools do not participate in the basketball match?
Additional table information: table: university_basketball
SQL: SELECT COUNT(*) FROM university WHERE NOT school_id IN (SELECT school_id FROM basketball_match)
Count the number of universities that do not participate in the baketball match.
Additional table information: table: university_basketball
SQL: SELECT COUNT(*) FROM university WHERE NOT school_id IN (SELECT school_id FROM basketball_match)
Find the schools that were either founded after 1850 or public.
Additional table information: table: university_basketball
SQL: SELECT school FROM university WHERE founded > 1850 OR affiliation = 'Public'
What are the schools that were either founded before 1850 or are public?
Additional table information: table: university_basketball
SQL: SELECT school FROM university WHERE founded > 1850 OR affiliation = 'Public'
Find how many different affiliation types there are.
Additional table information: table: university_basketball
SQL: SELECT COUNT(DISTINCT affiliation) FROM university
Count the number of different affiliation types.
Additional table information: table: university_basketball
SQL: SELECT COUNT(DISTINCT affiliation) FROM university
Find how many school locations have the word 'NY'.
Additional table information: table: university_basketball
SQL: SELECT COUNT(*) FROM university WHERE LOCATION LIKE '%NY%'
How many universities have a location that contains NY?
Additional table information: table: university_basketball
SQL: SELECT COUNT(*) FROM university WHERE LOCATION LIKE '%NY%'
Find the team names of the universities whose enrollments are smaller than the average enrollment size.
Additional table information: table: university_basketball
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)
What are the names of teams from universities that have a below average enrollment?
Additional table information: table: university_basketball
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)
Find the number of universities that have over a 20000 enrollment size for each affiliation type.
Additional table information: table: university_basketball
SQL: SELECT COUNT(*), affiliation FROM university WHERE enrollment > 20000 GROUP BY affiliation
What are the different affiliations, and how many schools with each have an enrollment size of above 20000?
Additional table information: table: university_basketball
SQL: SELECT COUNT(*), affiliation FROM university WHERE enrollment > 20000 GROUP BY affiliation
Find the total number of students enrolled in the colleges that were founded after the year of 1850 for each affiliation type.
Additional table information: table: university_basketball
SQL: SELECT SUM(Enrollment), affiliation FROM university WHERE founded > 1850 GROUP BY affiliation
What are the different affiliations, and what is the total enrollment of schools founded after 1850 for each enrollment type?
Additional table information: table: university_basketball
SQL: SELECT SUM(Enrollment), affiliation FROM university WHERE founded > 1850 GROUP BY affiliation
What is the maximum enrollment across all schools?
Additional table information: table: university_basketball
SQL: SELECT MAX(Enrollment) FROM university
Return the maximum enrollment across all schools.
Additional table information: table: university_basketball
SQL: SELECT MAX(Enrollment) FROM university
List all information regarding the basketball match.
Additional table information: table: university_basketball
SQL: SELECT * FROM basketball_match
What is all the information about the basketball match?
Additional table information: table: university_basketball
SQL: SELECT * FROM basketball_match
List names of all teams in the basketball competition, ordered by all home scores in descending order.
Additional table information: table: university_basketball
SQL: SELECT team_name FROM basketball_match ORDER BY All_Home DESC
What are the names of all the teams in the basketball competition, sorted by all home scores in descending order?
Additional table information: table: university_basketball
SQL: SELECT team_name FROM basketball_match ORDER BY All_Home DESC
the names of models that launched between 2002 and 2004.
Additional table information: table: phone_1
SQL: SELECT Model_name FROM chip_model WHERE Launch_year BETWEEN 2002 AND 2004
Which model has the least amount of RAM? List the model name and the amount of RAM.
Additional table information: table: phone_1
SQL: SELECT Model_name, RAM_MiB FROM chip_model ORDER BY RAM_MiB ASC NULLS FIRST LIMIT 1
What are the chip model and screen mode of the phone with hardware model name 'LG-P760'?
Additional table information: table: phone_1
SQL: SELECT chip_model, screen_mode FROM phone WHERE Hardware_Model_name = 'LG-P760'
How many phone hardware models are produced by the company named 'Nokia Corporation'?
Additional table information: table: phone_1
SQL: SELECT COUNT(*) FROM phone WHERE Company_name = 'Nokia Corporation'
What is maximum and minimum RAM size of phone produced by company named 'Nokia Corporation'?
Additional table information: table: phone_1
SQL: SELECT MAX(T1.RAM_MiB), MIN(T1.RAM_MiB) FROM chip_model AS T1 JOIN phone AS T2 ON T1.Model_name = T2.chip_model WHERE T2.Company_name = 'Nokia Corporation'
What is the average ROM size of phones produced by the company named 'Nokia Corporation'?
Additional table information: table: phone_1
SQL: SELECT AVG(T1.ROM_MiB) FROM chip_model AS T1 JOIN phone AS T2 ON T1.Model_name = T2.chip_model WHERE T2.Company_name = 'Nokia Corporation'
List the hardware model name and company name for all the phones that were launched in year 2002 or have RAM size greater than 32.
Additional table information: table: phone_1
SQL: SELECT T2.Hardware_Model_name, T2.Company_name FROM chip_model AS T1 JOIN phone AS T2 ON T1.Model_name = T2.chip_model WHERE T1.Launch_year = 2002 OR T1.RAM_MiB > 32
Find all phones that have word 'Full' in their accreditation types. List the Hardware Model name and Company name.
Additional table information: table: phone_1
SQL: SELECT Hardware_Model_name, Company_name FROM phone WHERE Accreditation_type LIKE 'Full'
Find the Char cells, Pixels and Hardware colours for the screen of the phone whose hardware model name is 'LG-P760'.
Additional table information: table: phone_1
SQL: SELECT T1.Char_cells, T1.Pixels, T1.Hardware_colours FROM screen_mode AS T1 JOIN phone AS T2 ON T1.Graphics_mode = T2.screen_mode WHERE T2.Hardware_Model_name = 'LG-P760'
List the hardware model name and company name for the phone whose screen mode type is 'Graphics.'
Additional table information: table: phone_1
SQL: SELECT T2.Hardware_Model_name, T2.Company_name FROM screen_mode AS T1 JOIN phone AS T2 ON T1.Graphics_mode = T2.screen_mode WHERE T1.Type = 'Graphics'
Find the name of the company that has the least number of phone models. List the company name and the number of phone model produced by that company.
Additional table information: table: phone_1
SQL: SELECT Company_name, COUNT(*) FROM phone GROUP BY Company_name ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1
List the name of the company that produced more than one phone model.
Additional table information: table: phone_1
SQL: SELECT Company_name FROM phone GROUP BY Company_name HAVING COUNT(*) > 1
List the maximum, minimum and average number of used kb in screen mode.
Additional table information: table: phone_1
SQL: SELECT MAX(used_kb), MIN(used_kb), AVG(used_kb) FROM screen_mode
List the name of the phone model launched in year 2002 and with the highest RAM size.
Additional table information: table: phone_1
SQL: SELECT T2.Hardware_Model_name FROM chip_model AS T1 JOIN phone AS T2 ON T1.Model_name = T2.chip_model WHERE T1.Launch_year = 2002 ORDER BY T1.RAM_MiB DESC LIMIT 1
What are the wifi and screen mode type of the hardware model named 'LG-P760'?
Additional table information: table: phone_1
SQL: SELECT T1.WiFi, T3.Type FROM chip_model AS T1 JOIN phone AS T2 ON T1.Model_name = T2.chip_model JOIN screen_mode AS T3 ON T2.screen_mode = T3.Graphics_mode WHERE T2.Hardware_Model_name = 'LG-P760'
List the hardware model name for the phones that have screen mode type 'Text' or RAM size greater than 32.
Additional table information: table: phone_1
SQL: SELECT T2.Hardware_Model_name FROM chip_model AS T1 JOIN phone AS T2 ON T1.Model_name = T2.chip_model JOIN screen_mode AS T3 ON T2.screen_mode = T3.Graphics_mode WHERE T3.Type = 'Text' OR T1.RAM_MiB > 32
List the hardware model name for the phones that were produced by 'Nokia Corporation' or whose screen mode type is 'Graphics.'
Additional table information: table: phone_1
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'
List the hardware model name for the phons that were produced by 'Nokia Corporation' but whose screen mode type is not Text.
Additional table information: table: phone_1
SQL: SELECT DISTINCT T2.Hardware_Model_name FROM screen_mode AS T1 JOIN phone AS T2 ON T1.Graphics_mode = T2.screen_mode WHERE t2.Company_name = 'Nokia Corporation' AND T1.Type <> 'Text'
List the phone hardware model and company name for the phones whose screen usage in kb is between 10 and 15.
Additional table information: table: phone_1
SQL: SELECT DISTINCT T2.Hardware_Model_name, T2.Company_name FROM screen_mode AS T1 JOIN phone AS T2 ON T1.Graphics_mode = T2.screen_mode WHERE T1.used_kb BETWEEN 10 AND 15
Find the number of phones for each accreditation type.
Additional table information: table: phone_1
SQL: SELECT Accreditation_type, COUNT(*) FROM phone GROUP BY Accreditation_type
How many phones belongs to each accreditation type?
Additional table information: table: phone_1
SQL: SELECT Accreditation_type, COUNT(*) FROM phone GROUP BY Accreditation_type
Find the accreditation level that more than 3 phones use.
Additional table information: table: phone_1
SQL: SELECT Accreditation_level FROM phone GROUP BY Accreditation_level HAVING COUNT(*) > 3
Find the details for all chip models.
Additional table information: table: phone_1
SQL: SELECT * FROM chip_model
How many models do not have the wifi function?
Additional table information: table: phone_1
SQL: SELECT COUNT(*) FROM chip_model WHERE wifi = 'No'
Count the number of chip model that do not have wifi.
Additional table information: table: phone_1
SQL: SELECT COUNT(*) FROM chip_model WHERE wifi = 'No'
List all the model names sorted by their launch year.
Additional table information: table: phone_1
SQL: SELECT model_name FROM chip_model ORDER BY launch_year NULLS FIRST
Find the average ram mib size of the chip models that are never used by any phone.
Additional table information: table: phone_1
SQL: SELECT AVG(RAM_MiB) FROM chip_model WHERE NOT model_name IN (SELECT chip_model FROM phone)
Find the names of the chip models that are not used by any phone with full accreditation type.
Additional table information: table: phone_1
SQL: SELECT model_name FROM chip_model EXCEPT SELECT chip_model FROM phone WHERE Accreditation_type = 'Full'
Find the pixels of the screen modes that are used by both phones with full accreditation types and phones with Provisional accreditation types.
Additional table information: table: phone_1
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'
How many countries are there in total?
Additional table information: table: match_season
SQL: SELECT COUNT(*) FROM country
Count the number of countries.
Additional table information: table: match_season
SQL: SELECT COUNT(*) FROM country
Show the country name and capital of all countries.
Additional table information: table: match_season
SQL: SELECT Country_name, Capital FROM country
What are the names and capitals of each country?
Additional table information: table: match_season
SQL: SELECT Country_name, Capital FROM country
Show all official native languages that contain the word 'English'.
Additional table information: table: match_season
SQL: SELECT Official_native_language FROM country WHERE Official_native_language LIKE '%English%'
What are the official native languages that contain the string 'English'.
Additional table information: table: match_season
SQL: SELECT Official_native_language FROM country WHERE Official_native_language LIKE '%English%'
Show all distinct positions of matches.
Additional table information: table: match_season
SQL: SELECT DISTINCT POSITION FROM match_season
What are the different positions for match season?
Additional table information: table: match_season
SQL: SELECT DISTINCT POSITION FROM match_season
Show the players from college UCLA.
Additional table information: table: match_season
SQL: SELECT Player FROM match_season WHERE College = 'UCLA'
Who are the players from UCLA?
Additional table information: table: match_season
SQL: SELECT Player FROM match_season WHERE College = 'UCLA'
Show the distinct position of players from college UCLA or Duke.
Additional table information: table: match_season
SQL: SELECT DISTINCT POSITION FROM match_season WHERE College = 'UCLA' OR College = 'Duke'
What are the different positions of players from UCLA or Duke colleges?
Additional table information: table: match_season
SQL: SELECT DISTINCT POSITION FROM match_season WHERE College = 'UCLA' OR College = 'Duke'
Show the draft pick numbers and draft classes of players whose positions are defenders.
Additional table information: table: match_season
SQL: SELECT Draft_Pick_Number, Draft_Class FROM match_season WHERE POSITION = 'Defender'
What are the draft pick numbers and draft classes for players who play the Defender position?
Additional table information: table: match_season
SQL: SELECT Draft_Pick_Number, Draft_Class FROM match_season WHERE POSITION = 'Defender'
How many distinct teams are involved in match seasons?
Additional table information: table: match_season
SQL: SELECT COUNT(DISTINCT Team) FROM match_season
Count the number of different teams involved in match season.
Additional table information: table: match_season
SQL: SELECT COUNT(DISTINCT Team) FROM match_season
Show the players and the years played.
Additional table information: table: match_season
SQL: SELECT Player, Years_Played FROM player
Who are the different players and how many years has each played?
Additional table information: table: match_season
SQL: SELECT Player, Years_Played FROM player
Show all team names.
Additional table information: table: match_season
SQL: SELECT Name FROM Team
What are the names of all teams?
Additional table information: table: match_season
SQL: SELECT Name FROM Team
Show the season, the player, and the name of the country that player belongs to.
Additional table information: table: match_season
SQL: SELECT T2.Season, T2.Player, T1.Country_name FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country
For each player, what are their name, season, and country that they belong to?
Additional table information: table: match_season
SQL: SELECT T2.Season, T2.Player, T1.Country_name FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country
Which players are from Indonesia?
Additional table information: table: match_season
SQL: SELECT T2.Player FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T1.Country_name = 'Indonesia'
Who are the players from Indonesia?
Additional table information: table: match_season
SQL: SELECT T2.Player FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T1.Country_name = 'Indonesia'
What are the distinct positions of the players from a country whose capital is Dublin?
Additional table information: table: match_season
SQL: SELECT DISTINCT T2.Position FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T1.Capital = 'Dublin'
Give the different positions of players who play for the country with the capital Dublin.
Additional table information: table: match_season
SQL: SELECT DISTINCT T2.Position FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T1.Capital = 'Dublin'
What are the official languages of the countries of players from Maryland or Duke college?
Additional table information: table: match_season
SQL: SELECT T1.Official_native_language FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T2.College = 'Maryland' OR T2.College = 'Duke'
Return the official native languages of countries who have players from Maryland or Duke colleges.
Additional table information: table: match_season
SQL: SELECT T1.Official_native_language FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T2.College = 'Maryland' OR T2.College = 'Duke'
How many distinct official languages are there among countries of players whose positions are defenders.
Additional table information: table: match_season
SQL: SELECT COUNT(DISTINCT T1.Official_native_language) FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T2.Position = 'Defender'
Count the number of different official languages corresponding to countries that players who play Defender are from.
Additional table information: table: match_season
SQL: SELECT COUNT(DISTINCT T1.Official_native_language) FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T2.Position = 'Defender'
Show the season, the player, and the name of the team that players belong to.
Additional table information: table: match_season
SQL: SELECT T1.Season, T1.Player, T2.Name FROM match_season AS T1 JOIN team AS T2 ON T1.Team = T2.Team_id
Who are the different players, what season do they play in, and what is the name of the team they are on?
Additional table information: table: match_season
SQL: SELECT T1.Season, T1.Player, T2.Name FROM match_season AS T1 JOIN team AS T2 ON T1.Team = T2.Team_id
Show the positions of the players from the team with name 'Ryley Goldner'.
Additional table information: table: match_season
SQL: SELECT T1.Position FROM match_season AS T1 JOIN team AS T2 ON T1.Team = T2.Team_id WHERE T2.Name = 'Ryley Goldner'
Return the positions of players on the team Ryley Goldner.
Additional table information: table: match_season
SQL: SELECT T1.Position FROM match_season AS T1 JOIN team AS T2 ON T1.Team = T2.Team_id WHERE T2.Name = 'Ryley Goldner'
How many distinct colleges are associated with players from the team with name 'Columbus Crew'.
Additional table information: table: match_season
SQL: SELECT COUNT(DISTINCT T1.College) FROM match_season AS T1 JOIN team AS T2 ON T1.Team = T2.Team_id WHERE T2.Name = 'Columbus Crew'
Count the number of different colleges that players who play for Columbus Crew are from.
Additional table information: table: match_season
SQL: SELECT COUNT(DISTINCT T1.College) FROM match_season AS T1 JOIN team AS T2 ON T1.Team = T2.Team_id WHERE T2.Name = 'Columbus Crew'
Show the players and years played for players from team 'Columbus Crew'.
Additional table information: table: match_season
SQL: SELECT T1.Player, T1.Years_Played FROM player AS T1 JOIN team AS T2 ON T1.Team = T2.Team_id WHERE T2.Name = 'Columbus Crew'
What are the players who played for Columbus Crew, and how many years did each play for?
Additional table information: table: match_season
SQL: SELECT T1.Player, T1.Years_Played FROM player AS T1 JOIN team AS T2 ON T1.Team = T2.Team_id WHERE T2.Name = 'Columbus Crew'
Show the position of players and the corresponding number of players.
Additional table information: table: match_season
SQL: SELECT POSITION, COUNT(*) FROM match_season GROUP BY POSITION
How many players played each position?
Additional table information: table: match_season
SQL: SELECT POSITION, COUNT(*) FROM match_season GROUP BY POSITION
Show the country names and the corresponding number of players.
Additional table information: table: match_season
SQL: SELECT Country_name, COUNT(*) FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country GROUP BY T1.Country_name
How many players are from each country?
Additional table information: table: match_season
SQL: SELECT Country_name, COUNT(*) FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country GROUP BY T1.Country_name
Return all players sorted by college in ascending alphabetical order.
Additional table information: table: match_season
SQL: SELECT player FROM match_season ORDER BY College ASC NULLS FIRST
What are all the players who played in match season, sorted by college in ascending alphabetical order?
Additional table information: table: match_season
SQL: SELECT player FROM match_season ORDER BY College ASC NULLS FIRST
Show the most common position of players in match seasons.
Additional table information: table: match_season
SQL: SELECT POSITION FROM match_season GROUP BY POSITION ORDER BY COUNT(*) DESC LIMIT 1
What is the position that is most common among players in match seasons?
Additional table information: table: match_season
SQL: SELECT POSITION FROM match_season GROUP BY POSITION ORDER BY COUNT(*) DESC LIMIT 1
Show the top 3 most common colleges of players in match seasons.
Additional table information: table: match_season
SQL: SELECT College FROM match_season GROUP BY College ORDER BY COUNT(*) DESC LIMIT 3
What are the three colleges from which the most players are from?
Additional table information: table: match_season
SQL: SELECT College FROM match_season GROUP BY College ORDER BY COUNT(*) DESC LIMIT 3
Show the name of colleges that have at least two players.
Additional table information: table: match_season
SQL: SELECT College FROM match_season GROUP BY College HAVING COUNT(*) >= 2