answer stringlengths 18 557 | context stringlengths 27 489 | question stringlengths 12 244 | text stringlengths 275 1.7k |
|---|---|---|---|
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 | CREATE TABLE services (service_name VARCHAR, service_id VARCHAR); CREATE TABLE first_notification_of_loss (service_id VARCHAR) | Find the name of services that have been used for more than 2 times in first notification of loss. | <s>[INST] Given the following SQL query and context: Query: 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 Context: CREATE TABLE services (service_name VARCHAR, service_id VARCHAR); CREATE TABLE first_notificat... |
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 | CREATE TABLE settlements (claim_id VARCHAR, settlement_amount INTEGER); CREATE TABLE claims (Effective_Date VARCHAR, claim_id VARCHAR) | What is the effective date of the claim that has the largest amount of total settlement? | <s>[INST] Given the following SQL query and context: Query: 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 Context: CREATE TABLE settlements (claim_id VARCHAR, settlement_amount INTEGER); CREATE TABLE cl... |
SELECT COUNT(*) FROM customers AS t1 JOIN customers_policies AS t2 ON t1.customer_id = t2.customer_id WHERE t1.customer_name = "Dayana Robel" | CREATE TABLE customers (customer_id VARCHAR, customer_name VARCHAR); CREATE TABLE customers_policies (customer_id VARCHAR) | How many policies are listed for the customer named "Dayana Robel"? | <s>[INST] Given the following SQL query and context: Query: SELECT COUNT(*) FROM customers AS t1 JOIN customers_policies AS t2 ON t1.customer_id = t2.customer_id WHERE t1.customer_name = "Dayana Robel" Context: CREATE TABLE customers (customer_id VARCHAR, customer_name VARCHAR); CREATE TABLE customers_policies (custome... |
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 | CREATE TABLE customers (customer_name VARCHAR, customer_id VARCHAR); CREATE TABLE customers_policies (customer_id VARCHAR) | What is the name of the customer who has the most policies listed? | <s>[INST] Given the following SQL query and context: Query: 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 Context: CREATE TABLE customers (customer_name VARCHAR, customer_id VARCHAR); CREATE TABLE cu... |
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" | CREATE TABLE customers (customer_id VARCHAR, customer_name VARCHAR); CREATE TABLE available_policies (policy_type_code VARCHAR, policy_id VARCHAR); CREATE TABLE customers_policies (customer_id VARCHAR, policy_id VARCHAR) | What are all the policy types of the customer named "Dayana Robel"? | <s>[INST] Given the following SQL query and context: Query: 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" Context: CREATE TABLE customers (cust... |
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 G... | CREATE TABLE customers (customer_id VARCHAR, customer_name VARCHAR); CREATE TABLE available_policies (policy_type_code VARCHAR, policy_id VARCHAR); CREATE TABLE customers_policies (customer_id VARCHAR, policy_id VARCHAR) | What are all the policy types of the customer that has the most policies listed? | <s>[INST] Given the following SQL query and context: Query: 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 c... |
SELECT service_name FROM services ORDER BY service_name | CREATE TABLE services (service_name VARCHAR) | List all the services in the alphabetical order. | <s>[INST] Given the following SQL query and context: Query: SELECT service_name FROM services ORDER BY service_name Context: CREATE TABLE services (service_name VARCHAR) [/INST] Based on the provided SQL query and context, your question is: List all the services in the alphabetical order. The answer to your question is... |
SELECT COUNT(*) FROM services | CREATE TABLE services (Id VARCHAR) | How many services are there? | <s>[INST] Given the following SQL query and context: Query: SELECT COUNT(*) FROM services Context: CREATE TABLE services (Id VARCHAR) [/INST] Based on the provided SQL query and context, your question is: How many services are there? The answer to your question is: SELECT COUNT(*) FROM services. [/s> |
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 | CREATE TABLE first_notification_of_loss (customer_id VARCHAR); CREATE TABLE customers (customer_name VARCHAR, customer_id VARCHAR); CREATE TABLE customers (customer_name VARCHAR) | Find the names of users who do not have a first notification of loss record. | <s>[INST] Given the following SQL query and context: Query: 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 Context: CREATE TABLE first_notification_of_loss (customer_id VARCHAR); CREATE TABLE customers (cus... |
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" | CREATE TABLE first_notification_of_loss (customer_id VARCHAR, service_id VARCHAR); CREATE TABLE customers (customer_name VARCHAR, customer_id VARCHAR); CREATE TABLE services (service_id VARCHAR, service_name VARCHAR) | Find the names of customers who have used either the service "Close a policy" or the service "Upgrade a policy". | <s>[INST] Given the following SQL query and context: Query: 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" Context:... |
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_... | CREATE TABLE first_notification_of_loss (customer_id VARCHAR, service_id VARCHAR); CREATE TABLE customers (customer_name VARCHAR, customer_id VARCHAR); CREATE TABLE services (service_id VARCHAR, service_name VARCHAR) | Find the names of customers who have used both the service "Close a policy" and the service "New policy application". | <s>[INST] Given the following SQL query and context: Query: 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... |
SELECT customer_id FROM customers WHERE customer_name LIKE "%Diana%" | CREATE TABLE customers (customer_id VARCHAR, customer_name VARCHAR) | Find the IDs of customers whose name contains "Diana". | <s>[INST] Given the following SQL query and context: Query: SELECT customer_id FROM customers WHERE customer_name LIKE "%Diana%" Context: CREATE TABLE customers (customer_id VARCHAR, customer_name VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Find the IDs of customers whose name contai... |
SELECT MAX(settlement_amount), MIN(settlement_amount) FROM settlements | CREATE TABLE settlements (settlement_amount INTEGER) | What are the maximum and minimum settlement amount on record? | <s>[INST] Given the following SQL query and context: Query: SELECT MAX(settlement_amount), MIN(settlement_amount) FROM settlements Context: CREATE TABLE settlements (settlement_amount INTEGER) [/INST] Based on the provided SQL query and context, your question is: What are the maximum and minimum settlement amount on re... |
SELECT customer_id, customer_name FROM customers ORDER BY customer_id | CREATE TABLE customers (customer_id VARCHAR, customer_name VARCHAR) | List all the customers in increasing order of IDs. | <s>[INST] Given the following SQL query and context: Query: SELECT customer_id, customer_name FROM customers ORDER BY customer_id Context: CREATE TABLE customers (customer_id VARCHAR, customer_name VARCHAR) [/INST] Based on the provided SQL query and context, your question is: List all the customers in increasing order... |
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%" | CREATE TABLE customers (customer_id VARCHAR, customer_name VARCHAR); CREATE TABLE customers_policies (date_opened VARCHAR, date_closed VARCHAR, customer_id VARCHAR) | Retrieve the open and close dates of all the policies associated with the customer whose name contains "Diana" | <s>[INST] Given the following SQL query and context: Query: 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%" Context: CREATE TABLE customers (customer_id VARCHAR, customer_name VARCHAR); CREATE TABLE custome... |
SELECT COUNT(*) FROM enzyme | CREATE TABLE enzyme (Id VARCHAR) | How many kinds of enzymes are there? | <s>[INST] Given the following SQL query and context: Query: SELECT COUNT(*) FROM enzyme Context: CREATE TABLE enzyme (Id VARCHAR) [/INST] Based on the provided SQL query and context, your question is: How many kinds of enzymes are there? The answer to your question is: SELECT COUNT(*) FROM enzyme. [/s> |
SELECT name FROM enzyme ORDER BY name DESC | CREATE TABLE enzyme (name VARCHAR) | List the name of enzymes in descending lexicographical order. | <s>[INST] Given the following SQL query and context: Query: SELECT name FROM enzyme ORDER BY name DESC Context: CREATE TABLE enzyme (name VARCHAR) [/INST] Based on the provided SQL query and context, your question is: List the name of enzymes in descending lexicographical order. The answer to your question is: SELECT n... |
SELECT name, LOCATION FROM enzyme | CREATE TABLE enzyme (name VARCHAR, LOCATION VARCHAR) | List the names and the locations that the enzymes can make an effect. | <s>[INST] Given the following SQL query and context: Query: SELECT name, LOCATION FROM enzyme Context: CREATE TABLE enzyme (name VARCHAR, LOCATION VARCHAR) [/INST] Based on the provided SQL query and context, your question is: List the names and the locations that the enzymes can make an effect. The answer to your ques... |
SELECT MAX(OMIM) FROM enzyme | CREATE TABLE enzyme (OMIM INTEGER) | What is the maximum Online Mendelian Inheritance in Man (OMIM) value of the enzymes? | <s>[INST] Given the following SQL query and context: Query: SELECT MAX(OMIM) FROM enzyme Context: CREATE TABLE enzyme (OMIM INTEGER) [/INST] Based on the provided SQL query and context, your question is: What is the maximum Online Mendelian Inheritance in Man (OMIM) value of the enzymes? The answer to your question is:... |
SELECT product, chromosome, porphyria FROM enzyme WHERE LOCATION = 'Cytosol' | CREATE TABLE enzyme (product VARCHAR, chromosome VARCHAR, porphyria VARCHAR, LOCATION VARCHAR) | What is the product, chromosome and porphyria related to the enzymes which take effect at the location 'Cytosol'? | <s>[INST] Given the following SQL query and context: Query: SELECT product, chromosome, porphyria FROM enzyme WHERE LOCATION = 'Cytosol' Context: CREATE TABLE enzyme (product VARCHAR, chromosome VARCHAR, porphyria VARCHAR, LOCATION VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What is ... |
SELECT name FROM enzyme WHERE product <> 'Heme' | CREATE TABLE enzyme (name VARCHAR, product VARCHAR) | What are the names of enzymes who does not produce 'Heme'? | <s>[INST] Given the following SQL query and context: Query: SELECT name FROM enzyme WHERE product <> 'Heme' Context: CREATE TABLE enzyme (name VARCHAR, product VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What are the names of enzymes who does not produce 'Heme'? The answer to your qu... |
SELECT name, trade_name FROM medicine WHERE FDA_approved = 'Yes' | CREATE TABLE medicine (name VARCHAR, trade_name VARCHAR, FDA_approved VARCHAR) | What are the names and trade names of the medicines which has 'Yes' value in the FDA record? | <s>[INST] Given the following SQL query and context: Query: SELECT name, trade_name FROM medicine WHERE FDA_approved = 'Yes' Context: CREATE TABLE medicine (name VARCHAR, trade_name VARCHAR, FDA_approved VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What are the names and trade names o... |
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' | CREATE TABLE medicine (id VARCHAR, name VARCHAR); CREATE TABLE medicine_enzyme_interaction (enzyme_id VARCHAR, medicine_id VARCHAR, interaction_type VARCHAR); CREATE TABLE enzyme (name VARCHAR, id VARCHAR) | What are the names of enzymes in the medicine named 'Amisulpride' that can serve as an 'inhibitor'? | <s>[INST] Given the following SQL query and context: Query: 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' Context: CREATE TABLE medicine (id VARCHAR, name V... |
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 | CREATE TABLE medicine_enzyme_interaction (medicine_id VARCHAR); CREATE TABLE medicine (id VARCHAR, Name VARCHAR) | What are the ids and names of the medicine that can interact with two or more enzymes? | <s>[INST] Given the following SQL query and context: Query: 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 Context: CREATE TABLE medicine_enzyme_interaction (medicine_id VARCHAR); CREATE TABLE medicine (id VARCHAR, Name VARC... |
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 | CREATE TABLE medicine_enzyme_interaction (medicine_id VARCHAR); CREATE TABLE medicine (id VARCHAR, Name VARCHAR, FDA_approved VARCHAR) | What are the ids, names and FDA approval status of medicines in descending order of the number of enzymes that it can interact with. | <s>[INST] Given the following SQL query and context: Query: 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 Context: CREATE TABLE medicine_enzyme_interaction (medicine_id VARCHAR); CREATE TABLE medicine (id... |
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 | CREATE TABLE medicine_enzyme_interaction (enzyme_id VARCHAR, interaction_type VARCHAR); CREATE TABLE enzyme (id VARCHAR, name VARCHAR) | What is the id and name of the enzyme with most number of medicines that can interact as 'activator'? | <s>[INST] Given the following SQL query and context: Query: 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 Context: CREATE TABLE medicine_enzyme_interaction (enzyme_id VARCHAR, i... |
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' | CREATE TABLE enzyme (id VARCHAR, name VARCHAR); CREATE TABLE medicine (id VARCHAR, name VARCHAR); CREATE TABLE medicine_enzyme_interaction (interaction_type VARCHAR, medicine_id VARCHAR, enzyme_id VARCHAR) | What is the interaction type of the enzyme named 'ALA synthase' and the medicine named 'Aripiprazole'? | <s>[INST] Given the following SQL query and context: Query: 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' Context: CREATE TABLE enzyme (id VARCHAR, name... |
SELECT interaction_type, COUNT(*) FROM medicine_enzyme_interaction GROUP BY interaction_type ORDER BY COUNT(*) DESC LIMIT 1 | CREATE TABLE medicine_enzyme_interaction (interaction_type VARCHAR) | What is the most common interaction type between enzymes and medicine? And how many are there? | <s>[INST] Given the following SQL query and context: Query: SELECT interaction_type, COUNT(*) FROM medicine_enzyme_interaction GROUP BY interaction_type ORDER BY COUNT(*) DESC LIMIT 1 Context: CREATE TABLE medicine_enzyme_interaction (interaction_type VARCHAR) [/INST] Based on the provided SQL query and context, your q... |
SELECT COUNT(*) FROM medicine WHERE FDA_approved = 'No' | CREATE TABLE medicine (FDA_approved VARCHAR) | How many medicines have the FDA approval status 'No' ? | <s>[INST] Given the following SQL query and context: Query: SELECT COUNT(*) FROM medicine WHERE FDA_approved = 'No' Context: CREATE TABLE medicine (FDA_approved VARCHAR) [/INST] Based on the provided SQL query and context, your question is: How many medicines have the FDA approval status 'No' ? The answer to your quest... |
SELECT COUNT(*) FROM enzyme WHERE NOT id IN (SELECT enzyme_id FROM medicine_enzyme_interaction) | CREATE TABLE medicine_enzyme_interaction (id VARCHAR, enzyme_id VARCHAR); CREATE TABLE enzyme (id VARCHAR, enzyme_id VARCHAR) | How many enzymes do not have any interactions? | <s>[INST] Given the following SQL query and context: Query: SELECT COUNT(*) FROM enzyme WHERE NOT id IN (SELECT enzyme_id FROM medicine_enzyme_interaction) Context: CREATE TABLE medicine_enzyme_interaction (id VARCHAR, enzyme_id VARCHAR); CREATE TABLE enzyme (id VARCHAR, enzyme_id VARCHAR) [/INST] Based on the provided... |
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 | CREATE TABLE medicine (id VARCHAR, trade_name VARCHAR); CREATE TABLE medicine_enzyme_interaction (medicine_id VARCHAR) | What is the id and trade name of the medicines can interact with at least 3 enzymes? | <s>[INST] Given the following SQL query and context: Query: 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 Context: CREATE TABLE medicine (id VARCHAR, trade_name VARCHAR); CREATE TABLE medicine_enzyme_interaction (medi... |
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' | CREATE TABLE enzyme (name VARCHAR, location VARCHAR, product VARCHAR, id VARCHAR); CREATE TABLE medicine_enzyme_interaction (enzyme_id VARCHAR, interaction_type VARCHAR) | What are the distinct name, location and products of the enzymes which has any 'inhibitor' interaction? | <s>[INST] Given the following SQL query and context: Query: 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' Context: CREATE TABLE enzyme (name VARCHAR, location VARCHAR, product VARCHAR, id VARCHAR)... |
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' | CREATE TABLE medicine (name VARCHAR, trade_name VARCHAR, id VARCHAR); CREATE TABLE medicine_enzyme_interaction (medicine_id VARCHAR) | List the medicine name and trade name which can both interact as 'inhibitor' and 'activitor' with enzymes. | <s>[INST] Given the following SQL query and context: Query: 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.med... |
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' | CREATE TABLE medicine (name VARCHAR, trade_name VARCHAR); CREATE TABLE medicine_enzyme_interaction (medicine_id VARCHAR, enzyme_id VARCHAR); CREATE TABLE medicine (name VARCHAR, trade_name VARCHAR, id VARCHAR); CREATE TABLE enzyme (id VARCHAR, product VARCHAR) | Show the medicine names and trade names that cannot interact with the enzyme with product 'Heme'. | <s>[INST] Given the following SQL query and context: Query: 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' Context: CREATE... |
SELECT COUNT(DISTINCT FDA_approved) FROM medicine | CREATE TABLE medicine (FDA_approved VARCHAR) | How many distinct FDA approval statuses are there for the medicines? | <s>[INST] Given the following SQL query and context: Query: SELECT COUNT(DISTINCT FDA_approved) FROM medicine Context: CREATE TABLE medicine (FDA_approved VARCHAR) [/INST] Based on the provided SQL query and context, your question is: How many distinct FDA approval statuses are there for the medicines? The answer to yo... |
SELECT name FROM enzyme WHERE name LIKE "%ALA%" | CREATE TABLE enzyme (name VARCHAR) | Which enzyme names have the substring "ALA"? | <s>[INST] Given the following SQL query and context: Query: SELECT name FROM enzyme WHERE name LIKE "%ALA%" Context: CREATE TABLE enzyme (name VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Which enzyme names have the substring "ALA"? The answer to your question is: SELECT name FROM enz... |
SELECT trade_name, COUNT(*) FROM medicine GROUP BY trade_name | CREATE TABLE medicine (trade_name VARCHAR) | find the number of medicines offered by each trade. | <s>[INST] Given the following SQL query and context: Query: SELECT trade_name, COUNT(*) FROM medicine GROUP BY trade_name Context: CREATE TABLE medicine (trade_name VARCHAR) [/INST] Based on the provided SQL query and context, your question is: find the number of medicines offered by each trade. The answer to your ques... |
SELECT school, nickname FROM university ORDER BY founded | CREATE TABLE university (school VARCHAR, nickname VARCHAR, founded VARCHAR) | List all schools and their nicknames in the order of founded year. | <s>[INST] Given the following SQL query and context: Query: SELECT school, nickname FROM university ORDER BY founded Context: CREATE TABLE university (school VARCHAR, nickname VARCHAR, founded VARCHAR) [/INST] Based on the provided SQL query and context, your question is: List all schools and their nicknames in the ord... |
SELECT school, LOCATION FROM university WHERE affiliation = 'Public' | CREATE TABLE university (school VARCHAR, LOCATION VARCHAR, affiliation VARCHAR) | List all public schools and their locations. | <s>[INST] Given the following SQL query and context: Query: SELECT school, LOCATION FROM university WHERE affiliation = 'Public' Context: CREATE TABLE university (school VARCHAR, LOCATION VARCHAR, affiliation VARCHAR) [/INST] Based on the provided SQL query and context, your question is: List all public schools and the... |
SELECT founded FROM university ORDER BY enrollment DESC LIMIT 1 | CREATE TABLE university (founded VARCHAR, enrollment VARCHAR) | When was the school with the largest enrollment founded? | <s>[INST] Given the following SQL query and context: Query: SELECT founded FROM university ORDER BY enrollment DESC LIMIT 1 Context: CREATE TABLE university (founded VARCHAR, enrollment VARCHAR) [/INST] Based on the provided SQL query and context, your question is: When was the school with the largest enrollment founde... |
SELECT founded FROM university WHERE affiliation <> 'Public' ORDER BY founded DESC LIMIT 1 | CREATE TABLE university (founded VARCHAR, affiliation VARCHAR) | Find the founded year of the newest non public school. | <s>[INST] Given the following SQL query and context: Query: SELECT founded FROM university WHERE affiliation <> 'Public' ORDER BY founded DESC LIMIT 1 Context: CREATE TABLE university (founded VARCHAR, affiliation VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Find the founded year of t... |
SELECT COUNT(DISTINCT school_id) FROM basketball_match | CREATE TABLE basketball_match (school_id VARCHAR) | How many schools are in the basketball match? | <s>[INST] Given the following SQL query and context: Query: SELECT COUNT(DISTINCT school_id) FROM basketball_match Context: CREATE TABLE basketball_match (school_id VARCHAR) [/INST] Based on the provided SQL query and context, your question is: How many schools are in the basketball match? The answer to your question i... |
SELECT acc_percent FROM basketball_match ORDER BY acc_percent DESC LIMIT 1 | CREATE TABLE basketball_match (acc_percent VARCHAR) | What is the highest acc percent score in the competition? | <s>[INST] Given the following SQL query and context: Query: SELECT acc_percent FROM basketball_match ORDER BY acc_percent DESC LIMIT 1 Context: CREATE TABLE basketball_match (acc_percent VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What is the highest acc percent score in the competit... |
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 | CREATE TABLE basketball_match (school_id VARCHAR, acc_percent VARCHAR); CREATE TABLE university (Primary_conference VARCHAR, school_id VARCHAR) | What is the primary conference of the school that has the lowest acc percent score in the competition? | <s>[INST] Given the following SQL query and context: Query: 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 Context: CREATE TABLE basketball_match (school_id VARCHAR, acc_percent VARCHAR); CREATE TABLE university (Primary_conf... |
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 | CREATE TABLE university (school_id VARCHAR, founded VARCHAR); CREATE TABLE basketball_match (team_name VARCHAR, ACC_Regular_Season VARCHAR, school_id VARCHAR) | What is the team name and acc regular season score of the school that was founded for the longest time? | <s>[INST] Given the following SQL query and context: Query: 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 Context: CREATE TABLE university (school_id VARCHAR, founded VARCHAR); CREATE TABLE basketball_match (team_n... |
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' | CREATE TABLE basketball_match (All_Games VARCHAR, school_id VARCHAR); CREATE TABLE university (location VARCHAR, school_id VARCHAR) | Find the location and all games score of the school that has Clemson as its team name. | <s>[INST] Given the following SQL query and context: Query: 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' Context: CREATE TABLE basketball_match (All_Games VARCHAR, school_id VARCHAR); CREATE TABLE university (location VARCH... |
SELECT AVG(enrollment) FROM university WHERE founded < 1850 | CREATE TABLE university (enrollment INTEGER, founded INTEGER) | What are the average enrollment size of the universities that are founded before 1850? | <s>[INST] Given the following SQL query and context: Query: SELECT AVG(enrollment) FROM university WHERE founded < 1850 Context: CREATE TABLE university (enrollment INTEGER, founded INTEGER) [/INST] Based on the provided SQL query and context, your question is: What are the average enrollment size of the universities t... |
SELECT enrollment, primary_conference FROM university ORDER BY founded LIMIT 1 | CREATE TABLE university (enrollment VARCHAR, primary_conference VARCHAR, founded VARCHAR) | Show the enrollment and primary_conference of the oldest college. | <s>[INST] Given the following SQL query and context: Query: SELECT enrollment, primary_conference FROM university ORDER BY founded LIMIT 1 Context: CREATE TABLE university (enrollment VARCHAR, primary_conference VARCHAR, founded VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Show the en... |
SELECT SUM(enrollment), MIN(enrollment) FROM university | CREATE TABLE university (enrollment INTEGER) | What is the total and minimum enrollment of all schools? | <s>[INST] Given the following SQL query and context: Query: SELECT SUM(enrollment), MIN(enrollment) FROM university Context: CREATE TABLE university (enrollment INTEGER) [/INST] Based on the provided SQL query and context, your question is: What is the total and minimum enrollment of all schools? The answer to your que... |
SELECT SUM(enrollment), affiliation FROM university GROUP BY affiliation | CREATE TABLE university (affiliation VARCHAR, enrollment INTEGER) | Find the total student enrollment for different affiliation type schools. | <s>[INST] Given the following SQL query and context: Query: SELECT SUM(enrollment), affiliation FROM university GROUP BY affiliation Context: CREATE TABLE university (affiliation VARCHAR, enrollment INTEGER) [/INST] Based on the provided SQL query and context, your question is: Find the total student enrollment for dif... |
SELECT COUNT(*) FROM university WHERE NOT school_id IN (SELECT school_id FROM basketball_match) | CREATE TABLE university (school_id VARCHAR); CREATE TABLE basketball_match (school_id VARCHAR) | How many schools do not participate in the basketball match? | <s>[INST] Given the following SQL query and context: Query: SELECT COUNT(*) FROM university WHERE NOT school_id IN (SELECT school_id FROM basketball_match) Context: CREATE TABLE university (school_id VARCHAR); CREATE TABLE basketball_match (school_id VARCHAR) [/INST] Based on the provided SQL query and context, your qu... |
SELECT school FROM university WHERE founded > 1850 OR affiliation = 'Public' | CREATE TABLE university (school VARCHAR, founded VARCHAR, affiliation VARCHAR) | Find the schools that were either founded after 1850 or public. | <s>[INST] Given the following SQL query and context: Query: SELECT school FROM university WHERE founded > 1850 OR affiliation = 'Public' Context: CREATE TABLE university (school VARCHAR, founded VARCHAR, affiliation VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Find the schools that we... |
SELECT COUNT(DISTINCT affiliation) FROM university | CREATE TABLE university (affiliation VARCHAR) | Find how many different affiliation types there are. | <s>[INST] Given the following SQL query and context: Query: SELECT COUNT(DISTINCT affiliation) FROM university Context: CREATE TABLE university (affiliation VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Find how many different affiliation types there are. The answer to your question is... |
SELECT COUNT(*) FROM university WHERE LOCATION LIKE "%NY%" | CREATE TABLE university (LOCATION VARCHAR) | Find how many school locations have the word 'NY'. | <s>[INST] Given the following SQL query and context: Query: SELECT COUNT(*) FROM university WHERE LOCATION LIKE "%NY%" Context: CREATE TABLE university (LOCATION VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Find how many school locations have the word 'NY'. The answer to your question... |
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) | CREATE TABLE university (school_id VARCHAR); CREATE TABLE basketball_match (team_name VARCHAR, school_id VARCHAR); CREATE TABLE university (enrollment INTEGER) | Find the team names of the universities whose enrollments are smaller than the average enrollment size. | <s>[INST] Given the following SQL query and context: Query: 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) Context: CREATE TABLE university (school_id VARCHAR); CREATE TABLE basketball_match (team_name VARC... |
SELECT COUNT(*), affiliation FROM university WHERE enrollment > 20000 GROUP BY affiliation | CREATE TABLE university (affiliation VARCHAR, enrollment INTEGER) | Find the number of universities that have over a 20000 enrollment size for each affiliation type. | <s>[INST] Given the following SQL query and context: Query: SELECT COUNT(*), affiliation FROM university WHERE enrollment > 20000 GROUP BY affiliation Context: CREATE TABLE university (affiliation VARCHAR, enrollment INTEGER) [/INST] Based on the provided SQL query and context, your question is: Find the number of univ... |
SELECT SUM(Enrollment), affiliation FROM university WHERE founded > 1850 GROUP BY affiliation | CREATE TABLE university (affiliation VARCHAR, Enrollment INTEGER, founded INTEGER) | Find the total number of students enrolled in the colleges that were founded after the year of 1850 for each affiliation type. | <s>[INST] Given the following SQL query and context: Query: SELECT SUM(Enrollment), affiliation FROM university WHERE founded > 1850 GROUP BY affiliation Context: CREATE TABLE university (affiliation VARCHAR, Enrollment INTEGER, founded INTEGER) [/INST] Based on the provided SQL query and context, your question is: Fin... |
SELECT MAX(Enrollment) FROM university | CREATE TABLE university (Enrollment INTEGER) | What is the maximum enrollment across all schools? | <s>[INST] Given the following SQL query and context: Query: SELECT MAX(Enrollment) FROM university Context: CREATE TABLE university (Enrollment INTEGER) [/INST] Based on the provided SQL query and context, your question is: What is the maximum enrollment across all schools? The answer to your question is: SELECT MAX(En... |
SELECT * FROM basketball_match | CREATE TABLE basketball_match (Id VARCHAR) | List all information regarding the basketball match. | <s>[INST] Given the following SQL query and context: Query: SELECT * FROM basketball_match Context: CREATE TABLE basketball_match (Id VARCHAR) [/INST] Based on the provided SQL query and context, your question is: List all information regarding the basketball match. The answer to your question is: SELECT * FROM basketb... |
SELECT team_name FROM basketball_match ORDER BY All_Home DESC | CREATE TABLE basketball_match (team_name VARCHAR, All_Home VARCHAR) | List names of all teams in the basketball competition, ordered by all home scores in descending order. | <s>[INST] Given the following SQL query and context: Query: SELECT team_name FROM basketball_match ORDER BY All_Home DESC Context: CREATE TABLE basketball_match (team_name VARCHAR, All_Home VARCHAR) [/INST] Based on the provided SQL query and context, your question is: List names of all teams in the basketball competit... |
SELECT Model_name FROM chip_model WHERE Launch_year BETWEEN 2002 AND 2004 | CREATE TABLE chip_model (Model_name VARCHAR, Launch_year INTEGER) | the names of models that launched between 2002 and 2004. | <s>[INST] Given the following SQL query and context: Query: SELECT Model_name FROM chip_model WHERE Launch_year BETWEEN 2002 AND 2004 Context: CREATE TABLE chip_model (Model_name VARCHAR, Launch_year INTEGER) [/INST] Based on the provided SQL query and context, your question is: the names of models that launched betwee... |
SELECT Model_name, RAM_MiB FROM chip_model ORDER BY RAM_MiB LIMIT 1 | CREATE TABLE chip_model (Model_name VARCHAR, RAM_MiB VARCHAR) | Which model has the least amount of RAM? List the model name and the amount of RAM. | <s>[INST] Given the following SQL query and context: Query: SELECT Model_name, RAM_MiB FROM chip_model ORDER BY RAM_MiB LIMIT 1 Context: CREATE TABLE chip_model (Model_name VARCHAR, RAM_MiB VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Which model has the least amount of RAM? List the ... |
SELECT chip_model, screen_mode FROM phone WHERE Hardware_Model_name = "LG-P760" | CREATE TABLE phone (chip_model VARCHAR, screen_mode VARCHAR, Hardware_Model_name VARCHAR) | What are the chip model and screen mode of the phone with hardware model name "LG-P760"? | <s>[INST] Given the following SQL query and context: Query: SELECT chip_model, screen_mode FROM phone WHERE Hardware_Model_name = "LG-P760" Context: CREATE TABLE phone (chip_model VARCHAR, screen_mode VARCHAR, Hardware_Model_name VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What are t... |
SELECT COUNT(*) FROM phone WHERE Company_name = "Nokia Corporation" | CREATE TABLE phone (Company_name VARCHAR) | How many phone hardware models are produced by the company named "Nokia Corporation"? | <s>[INST] Given the following SQL query and context: Query: SELECT COUNT(*) FROM phone WHERE Company_name = "Nokia Corporation" Context: CREATE TABLE phone (Company_name VARCHAR) [/INST] Based on the provided SQL query and context, your question is: How many phone hardware models are produced by the company named "Noki... |
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" | CREATE TABLE phone (chip_model VARCHAR, Company_name VARCHAR); CREATE TABLE chip_model (RAM_MiB INTEGER, Model_name VARCHAR) | What is maximum and minimum RAM size of phone produced by company named "Nokia Corporation"? | <s>[INST] Given the following SQL query and context: Query: 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" Context: CREATE TABLE phone (chip_model VARCHAR, Company_name VARCHAR); CREATE TABLE chip_model (RAM_MiB... |
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" | CREATE TABLE phone (chip_model VARCHAR, Company_name VARCHAR); CREATE TABLE chip_model (ROM_MiB INTEGER, Model_name VARCHAR) | What is the average ROM size of phones produced by the company named "Nokia Corporation"? | <s>[INST] Given the following SQL query and context: Query: 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" Context: CREATE TABLE phone (chip_model VARCHAR, Company_name VARCHAR); CREATE TABLE chip_model (ROM_MiB INTEGER, Model_n... |
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 | CREATE TABLE chip_model (Model_name VARCHAR, Launch_year VARCHAR, RAM_MiB VARCHAR); CREATE TABLE phone (Hardware_Model_name VARCHAR, Company_name VARCHAR, chip_model VARCHAR) | 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. | <s>[INST] Given the following SQL query and context: Query: 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 Context: CREATE TABLE chip_model (Model_name VARCHAR, Launch_year VARCHAR, RAM_MiB VARCHAR); C... |
SELECT Hardware_Model_name, Company_name FROM phone WHERE Accreditation_type LIKE 'Full' | CREATE TABLE phone (Hardware_Model_name VARCHAR, Company_name VARCHAR, Accreditation_type VARCHAR) | Find all phones that have word 'Full' in their accreditation types. List the Hardware Model name and Company name. | <s>[INST] Given the following SQL query and context: Query: SELECT Hardware_Model_name, Company_name FROM phone WHERE Accreditation_type LIKE 'Full' Context: CREATE TABLE phone (Hardware_Model_name VARCHAR, Company_name VARCHAR, Accreditation_type VARCHAR) [/INST] Based on the provided SQL query and context, your quest... |
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" | CREATE TABLE phone (screen_mode VARCHAR, Hardware_Model_name VARCHAR); CREATE TABLE screen_mode (Char_cells VARCHAR, Pixels VARCHAR, Hardware_colours VARCHAR, Graphics_mode VARCHAR) | Find the Char cells, Pixels and Hardware colours for the screen of the phone whose hardware model name is "LG-P760". | <s>[INST] Given the following SQL query and context: Query: 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" Context: CREATE TABLE phone (screen_mode VARCHAR, Hardware_Model_name VARCHAR); CREATE TA... |
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" | CREATE TABLE phone (Hardware_Model_name VARCHAR, Company_name VARCHAR, screen_mode VARCHAR); CREATE TABLE screen_mode (Graphics_mode VARCHAR, Type VARCHAR) | List the hardware model name and company name for the phone whose screen mode type is "Graphics." | <s>[INST] Given the following SQL query and context: Query: 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" Context: CREATE TABLE phone (Hardware_Model_name VARCHAR, Company_name VARCHAR, screen_mode VARCHAR); CREATE ... |
SELECT Company_name, COUNT(*) FROM phone GROUP BY Company_name ORDER BY COUNT(*) LIMIT 1 | CREATE TABLE phone (Company_name VARCHAR) | 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. | <s>[INST] Given the following SQL query and context: Query: SELECT Company_name, COUNT(*) FROM phone GROUP BY Company_name ORDER BY COUNT(*) LIMIT 1 Context: CREATE TABLE phone (Company_name VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Find the name of the company that has the least n... |
SELECT Company_name FROM phone GROUP BY Company_name HAVING COUNT(*) > 1 | CREATE TABLE phone (Company_name VARCHAR) | List the name of the company that produced more than one phone model. | <s>[INST] Given the following SQL query and context: Query: SELECT Company_name FROM phone GROUP BY Company_name HAVING COUNT(*) > 1 Context: CREATE TABLE phone (Company_name VARCHAR) [/INST] Based on the provided SQL query and context, your question is: List the name of the company that produced more than one phone mo... |
SELECT MAX(used_kb), MIN(used_kb), AVG(used_kb) FROM screen_mode | CREATE TABLE screen_mode (used_kb INTEGER) | List the maximum, minimum and average number of used kb in screen mode. | <s>[INST] Given the following SQL query and context: Query: SELECT MAX(used_kb), MIN(used_kb), AVG(used_kb) FROM screen_mode Context: CREATE TABLE screen_mode (used_kb INTEGER) [/INST] Based on the provided SQL query and context, your question is: List the maximum, minimum and average number of used kb in screen mode. ... |
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 | CREATE TABLE chip_model (Model_name VARCHAR, Launch_year VARCHAR, RAM_MiB VARCHAR); CREATE TABLE phone (Hardware_Model_name VARCHAR, chip_model VARCHAR) | List the name of the phone model launched in year 2002 and with the highest RAM size. | <s>[INST] Given the following SQL query and context: Query: 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 Context: CREATE TABLE chip_model (Model_name VARCHAR, Launch_year VARCHAR, RAM_MiB VARCHAR); CREA... |
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" | CREATE TABLE phone (chip_model VARCHAR, screen_mode VARCHAR, Hardware_Model_name VARCHAR); CREATE TABLE chip_model (WiFi VARCHAR, Model_name VARCHAR); CREATE TABLE screen_mode (Type VARCHAR, Graphics_mode VARCHAR) | What are the wifi and screen mode type of the hardware model named "LG-P760"? | <s>[INST] Given the following SQL query and context: Query: 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" Context: CREATE TABLE phone (chip_model VARCHAR, screen_mode VA... |
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 | CREATE TABLE chip_model (Model_name VARCHAR, RAM_MiB VARCHAR); CREATE TABLE phone (Hardware_Model_name VARCHAR, chip_model VARCHAR, screen_mode VARCHAR); CREATE TABLE screen_mode (Graphics_mode VARCHAR, Type VARCHAR) | List the hardware model name for the phones that have screen mode type "Text" or RAM size greater than 32. | <s>[INST] Given the following SQL query and context: Query: 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 Context: CREATE TABLE chip_model (Model_name VARCHAR, RA... |
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" | CREATE TABLE phone (Hardware_Model_name VARCHAR, screen_mode VARCHAR); CREATE TABLE screen_mode (Graphics_mode VARCHAR, Type VARCHAR) | List the hardware model name for the phones that were produced by "Nokia Corporation" or whose screen mode type is "Graphics." | <s>[INST] Given the following SQL query and context: Query: 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" Context: CREATE TABLE phone (Hardware_Model_name VARCHAR, screen_mode VARCHA... |
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" | CREATE TABLE phone (Hardware_Model_name VARCHAR, screen_mode VARCHAR); CREATE TABLE screen_mode (Graphics_mode VARCHAR, Type VARCHAR) | List the hardware model name for the phons that were produced by "Nokia Corporation" but whose screen mode type is not Text. | <s>[INST] Given the following SQL query and context: Query: 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" Context: CREATE TABLE phone (Hardware_Model_name VARCHAR, screen_mode VARCHAR)... |
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 | CREATE TABLE phone (Hardware_Model_name VARCHAR, Company_name VARCHAR, screen_mode VARCHAR); CREATE TABLE screen_mode (Graphics_mode VARCHAR, used_kb INTEGER) | List the phone hardware model and company name for the phones whose screen usage in kb is between 10 and 15. | <s>[INST] Given the following SQL query and context: Query: 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 Context: CREATE TABLE phone (Hardware_Model_name VARCHAR, Company_name VARCHAR, screen_mode ... |
SELECT Accreditation_type, COUNT(*) FROM phone GROUP BY Accreditation_type | CREATE TABLE phone (Accreditation_type VARCHAR) | Find the number of phones for each accreditation type. | <s>[INST] Given the following SQL query and context: Query: SELECT Accreditation_type, COUNT(*) FROM phone GROUP BY Accreditation_type Context: CREATE TABLE phone (Accreditation_type VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Find the number of phones for each accreditation type. Th... |
SELECT Accreditation_level FROM phone GROUP BY Accreditation_level HAVING COUNT(*) > 3 | CREATE TABLE phone (Accreditation_level VARCHAR) | Find the accreditation level that more than 3 phones use. | <s>[INST] Given the following SQL query and context: Query: SELECT Accreditation_level FROM phone GROUP BY Accreditation_level HAVING COUNT(*) > 3 Context: CREATE TABLE phone (Accreditation_level VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Find the accreditation level that more than ... |
SELECT * FROM chip_model | CREATE TABLE chip_model (Id VARCHAR) | Find the details for all chip models. | <s>[INST] Given the following SQL query and context: Query: SELECT * FROM chip_model Context: CREATE TABLE chip_model (Id VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Find the details for all chip models. The answer to your question is: SELECT * FROM chip_model. [/s> |
SELECT COUNT(*) FROM chip_model WHERE wifi = 'No' | CREATE TABLE chip_model (wifi VARCHAR) | How many models do not have the wifi function? | <s>[INST] Given the following SQL query and context: Query: SELECT COUNT(*) FROM chip_model WHERE wifi = 'No' Context: CREATE TABLE chip_model (wifi VARCHAR) [/INST] Based on the provided SQL query and context, your question is: How many models do not have the wifi function? The answer to your question is: SELECT COUNT... |
SELECT model_name FROM chip_model ORDER BY launch_year | CREATE TABLE chip_model (model_name VARCHAR, launch_year VARCHAR) | List all the model names sorted by their launch year. | <s>[INST] Given the following SQL query and context: Query: SELECT model_name FROM chip_model ORDER BY launch_year Context: CREATE TABLE chip_model (model_name VARCHAR, launch_year VARCHAR) [/INST] Based on the provided SQL query and context, your question is: List all the model names sorted by their launch year. The a... |
SELECT AVG(RAM_MiB) FROM chip_model WHERE NOT model_name IN (SELECT chip_model FROM phone) | CREATE TABLE chip_model (RAM_MiB INTEGER, model_name VARCHAR, chip_model VARCHAR); CREATE TABLE phone (RAM_MiB INTEGER, model_name VARCHAR, chip_model VARCHAR) | Find the average ram mib size of the chip models that are never used by any phone. | <s>[INST] Given the following SQL query and context: Query: SELECT AVG(RAM_MiB) FROM chip_model WHERE NOT model_name IN (SELECT chip_model FROM phone) Context: CREATE TABLE chip_model (RAM_MiB INTEGER, model_name VARCHAR, chip_model VARCHAR); CREATE TABLE phone (RAM_MiB INTEGER, model_name VARCHAR, chip_model VARCHAR) ... |
SELECT model_name FROM chip_model EXCEPT SELECT chip_model FROM phone WHERE Accreditation_type = 'Full' | CREATE TABLE chip_model (model_name VARCHAR, chip_model VARCHAR, Accreditation_type VARCHAR); CREATE TABLE phone (model_name VARCHAR, chip_model VARCHAR, Accreditation_type VARCHAR) | Find the names of the chip models that are not used by any phone with full accreditation type. | <s>[INST] Given the following SQL query and context: Query: SELECT model_name FROM chip_model EXCEPT SELECT chip_model FROM phone WHERE Accreditation_type = 'Full' Context: CREATE TABLE chip_model (model_name VARCHAR, chip_model VARCHAR, Accreditation_type VARCHAR); CREATE TABLE phone (model_name VARCHAR, chip_model VA... |
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' | CREATE TABLE phone (screen_mode VARCHAR, Accreditation_type VARCHAR); CREATE TABLE screen_mode (pixels VARCHAR, Graphics_mode VARCHAR) | Find the pixels of the screen modes that are used by both phones with full accreditation types and phones with Provisional accreditation types. | <s>[INST] Given the following SQL query and context: Query: 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.Accredita... |
SELECT COUNT(*) FROM country | CREATE TABLE country (Id VARCHAR) | How many countries are there in total? | <s>[INST] Given the following SQL query and context: Query: SELECT COUNT(*) FROM country Context: CREATE TABLE country (Id VARCHAR) [/INST] Based on the provided SQL query and context, your question is: How many countries are there in total? The answer to your question is: SELECT COUNT(*) FROM country. [/s> |
SELECT Country_name, Capital FROM country | CREATE TABLE country (Country_name VARCHAR, Capital VARCHAR) | Show the country name and capital of all countries. | <s>[INST] Given the following SQL query and context: Query: SELECT Country_name, Capital FROM country Context: CREATE TABLE country (Country_name VARCHAR, Capital VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Show the country name and capital of all countries. The answer to your questi... |
SELECT Official_native_language FROM country WHERE Official_native_language LIKE "%English%" | CREATE TABLE country (Official_native_language VARCHAR) | Show all official native languages that contain the word "English". | <s>[INST] Given the following SQL query and context: Query: SELECT Official_native_language FROM country WHERE Official_native_language LIKE "%English%" Context: CREATE TABLE country (Official_native_language VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Show all official native langua... |
SELECT DISTINCT POSITION FROM match_season | CREATE TABLE match_season (POSITION VARCHAR) | Show all distinct positions of matches. | <s>[INST] Given the following SQL query and context: Query: SELECT DISTINCT POSITION FROM match_season Context: CREATE TABLE match_season (POSITION VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Show all distinct positions of matches. The answer to your question is: SELECT DISTINCT POSI... |
SELECT Player FROM match_season WHERE College = "UCLA" | CREATE TABLE match_season (Player VARCHAR, College VARCHAR) | Show the players from college UCLA. | <s>[INST] Given the following SQL query and context: Query: SELECT Player FROM match_season WHERE College = "UCLA" Context: CREATE TABLE match_season (Player VARCHAR, College VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Show the players from college UCLA. The answer to your question i... |
SELECT DISTINCT POSITION FROM match_season WHERE College = "UCLA" OR College = "Duke" | CREATE TABLE match_season (POSITION VARCHAR, College VARCHAR) | Show the distinct position of players from college UCLA or Duke. | <s>[INST] Given the following SQL query and context: Query: SELECT DISTINCT POSITION FROM match_season WHERE College = "UCLA" OR College = "Duke" Context: CREATE TABLE match_season (POSITION VARCHAR, College VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Show the distinct position of pl... |
SELECT Draft_Pick_Number, Draft_Class FROM match_season WHERE POSITION = "Defender" | CREATE TABLE match_season (Draft_Pick_Number VARCHAR, Draft_Class VARCHAR, POSITION VARCHAR) | Show the draft pick numbers and draft classes of players whose positions are defenders. | <s>[INST] Given the following SQL query and context: Query: SELECT Draft_Pick_Number, Draft_Class FROM match_season WHERE POSITION = "Defender" Context: CREATE TABLE match_season (Draft_Pick_Number VARCHAR, Draft_Class VARCHAR, POSITION VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Sho... |
SELECT COUNT(DISTINCT Team) FROM match_season | CREATE TABLE match_season (Team VARCHAR) | How many distinct teams are involved in match seasons? | <s>[INST] Given the following SQL query and context: Query: SELECT COUNT(DISTINCT Team) FROM match_season Context: CREATE TABLE match_season (Team VARCHAR) [/INST] Based on the provided SQL query and context, your question is: How many distinct teams are involved in match seasons? The answer to your question is: SELECT... |
SELECT Player, Years_Played FROM player | CREATE TABLE player (Player VARCHAR, Years_Played VARCHAR) | Show the players and the years played. | <s>[INST] Given the following SQL query and context: Query: SELECT Player, Years_Played FROM player Context: CREATE TABLE player (Player VARCHAR, Years_Played VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Show the players and the years played. The answer to your question is: SELECT Pla... |
SELECT Name FROM Team | CREATE TABLE Team (Name VARCHAR) | Show all team names. | <s>[INST] Given the following SQL query and context: Query: SELECT Name FROM Team Context: CREATE TABLE Team (Name VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Show all team names. The answer to your question is: SELECT Name FROM Team. [/s> |
SELECT T2.Season, T2.Player, T1.Country_name FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country | CREATE TABLE match_season (Season VARCHAR, Player VARCHAR, Country VARCHAR); CREATE TABLE country (Country_name VARCHAR, Country_id VARCHAR) | Show the season, the player, and the name of the country that player belongs to. | <s>[INST] Given the following SQL query and context: Query: SELECT T2.Season, T2.Player, T1.Country_name FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country Context: CREATE TABLE match_season (Season VARCHAR, Player VARCHAR, Country VARCHAR); CREATE TABLE country (Country_name VARCHAR, Country_id V... |
SELECT T2.Player FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T1.Country_name = "Indonesia" | CREATE TABLE country (Country_id VARCHAR, Country_name VARCHAR); CREATE TABLE match_season (Player VARCHAR, Country VARCHAR) | Which players are from Indonesia? | <s>[INST] Given the following SQL query and context: Query: SELECT T2.Player FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T1.Country_name = "Indonesia" Context: CREATE TABLE country (Country_id VARCHAR, Country_name VARCHAR); CREATE TABLE match_season (Player VARCHAR, Country VARCHAR) ... |
SELECT DISTINCT T2.Position FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T1.Capital = "Dublin" | CREATE TABLE country (Country_id VARCHAR, Capital VARCHAR); CREATE TABLE match_season (Position VARCHAR, Country VARCHAR) | What are the distinct positions of the players from a country whose capital is Dublin? | <s>[INST] Given the following SQL query and context: Query: SELECT DISTINCT T2.Position FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T1.Capital = "Dublin" Context: CREATE TABLE country (Country_id VARCHAR, Capital VARCHAR); CREATE TABLE match_season (Position VARCHAR, Country VARCHAR) ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.