prompt
stringlengths
155
8.09k
answer
stringlengths
18
577
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What are card ids, customer ids, card types, and card numbers for each customer card?, schema:CREATE TABLE `Accounts` (`account_id` INTEGER PRIMARY KEY,`customer_id` INTEGER NOT NULL,`account_name` VAR...
SELECT card_id , customer_id , card_type_code , card_number FROM Customers_cards
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Show the date valid from and the date valid to for the card with card number '4560596484842'., schema:CREATE TABLE `Accounts` (`account_id` INTEGER PRIMARY KEY,`customer_id` INTEGER NOT NULL,`account_n...
SELECT date_valid_from , date_valid_to FROM Customers_cards WHERE card_number = "4560596484842"
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What are the valid from and valid to dates for the card with the number 4560596484842?, schema:CREATE TABLE `Accounts` (`account_id` INTEGER PRIMARY KEY,`customer_id` INTEGER NOT NULL,`account_name` VA...
SELECT date_valid_from , date_valid_to FROM Customers_cards WHERE card_number = "4560596484842"
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What is the first name, last name, and phone of the customer with card 4560596484842., schema:CREATE TABLE `Accounts` (`account_id` INTEGER PRIMARY KEY,`customer_id` INTEGER NOT NULL,`account_name` VAR...
SELECT T2.customer_first_name , T2.customer_last_name , T2.customer_phone FROM Customers_cards AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T1.card_number = "4560596484842"
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Return the full name and phone of the customer who has card number 4560596484842., schema:CREATE TABLE `Accounts` (`account_id` INTEGER PRIMARY KEY,`customer_id` INTEGER NOT NULL,`account_name` VARCHAR...
SELECT T2.customer_first_name , T2.customer_last_name , T2.customer_phone FROM Customers_cards AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T1.card_number = "4560596484842"
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:How many cards does customer Art Turcotte have?, schema:CREATE TABLE `Accounts` (`account_id` INTEGER PRIMARY KEY,`customer_id` INTEGER NOT NULL,`account_name` VARCHAR(50),`other_account_details` VARCH...
SELECT count(*) FROM Customers_cards AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.customer_first_name = "Art" AND T2.customer_last_name = "Turcotte"
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Count the number of cards the customer with the first name Art and last name Turcotte has., schema:CREATE TABLE `Accounts` (`account_id` INTEGER PRIMARY KEY,`customer_id` INTEGER NOT NULL,`account_name...
SELECT count(*) FROM Customers_cards AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.customer_first_name = "Art" AND T2.customer_last_name = "Turcotte"
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:How many debit cards do we have?, schema:CREATE TABLE `Accounts` (`account_id` INTEGER PRIMARY KEY,`customer_id` INTEGER NOT NULL,`account_name` VARCHAR(50),`other_account_details` VARCHAR(255)); CREAT...
SELECT count(*) FROM Customers_cards WHERE card_type_code = "Debit"
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Count the number of customer cards of the type Debit., schema:CREATE TABLE `Accounts` (`account_id` INTEGER PRIMARY KEY,`customer_id` INTEGER NOT NULL,`account_name` VARCHAR(50),`other_account_details`...
SELECT count(*) FROM Customers_cards WHERE card_type_code = "Debit"
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:How many credit cards does customer Blanche Huels have?, schema:CREATE TABLE `Accounts` (`account_id` INTEGER PRIMARY KEY,`customer_id` INTEGER NOT NULL,`account_name` VARCHAR(50),`other_account_detail...
SELECT count(*) FROM Customers_cards AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.customer_first_name = "Blanche" AND T2.customer_last_name = "Huels" AND T1.card_type_code = "Credit"
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Count the number of credit cards that the customer with first name Blanche and last name Huels has., schema:CREATE TABLE `Accounts` (`account_id` INTEGER PRIMARY KEY,`customer_id` INTEGER NOT NULL,`acc...
SELECT count(*) FROM Customers_cards AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.customer_first_name = "Blanche" AND T2.customer_last_name = "Huels" AND T1.card_type_code = "Credit"
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Show all customer ids and the number of cards owned by each customer., schema:CREATE TABLE `Accounts` (`account_id` INTEGER PRIMARY KEY,`customer_id` INTEGER NOT NULL,`account_name` VARCHAR(50),`other_...
SELECT customer_id , count(*) FROM Customers_cards GROUP BY customer_id
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What are the different customer ids, and how many cards does each one hold?, schema:CREATE TABLE `Accounts` (`account_id` INTEGER PRIMARY KEY,`customer_id` INTEGER NOT NULL,`account_name` VARCHAR(50),`...
SELECT customer_id , count(*) FROM Customers_cards GROUP BY customer_id
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What is the customer id with most number of cards, and how many does he have?, schema:CREATE TABLE `Accounts` (`account_id` INTEGER PRIMARY KEY,`customer_id` INTEGER NOT NULL,`account_name` VARCHAR(50)...
SELECT customer_id , count(*) FROM Customers_cards GROUP BY customer_id ORDER BY count(*) DESC LIMIT 1
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Return the id of the customer who has the most cards, as well as the number of cards., schema:CREATE TABLE `Accounts` (`account_id` INTEGER PRIMARY KEY,`customer_id` INTEGER NOT NULL,`account_name` VAR...
SELECT customer_id , count(*) FROM Customers_cards GROUP BY customer_id ORDER BY count(*) DESC LIMIT 1
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Show id, first and last names for all customers with at least two cards., schema:CREATE TABLE `Accounts` (`account_id` INTEGER PRIMARY KEY,`customer_id` INTEGER NOT NULL,`account_name` VARCHAR(50),`oth...
SELECT T1.customer_id , T2.customer_first_name , T2.customer_last_name FROM Customers_cards AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id HAVING count(*) >= 2
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What are the ids and full names of customers who hold two or more cards?, schema:CREATE TABLE `Accounts` (`account_id` INTEGER PRIMARY KEY,`customer_id` INTEGER NOT NULL,`account_name` VARCHAR(50),`oth...
SELECT T1.customer_id , T2.customer_first_name , T2.customer_last_name FROM Customers_cards AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id HAVING count(*) >= 2
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What is the customer id, first and last name with least number of accounts., schema:CREATE TABLE `Accounts` (`account_id` INTEGER PRIMARY KEY,`customer_id` INTEGER NOT NULL,`account_name` VARCHAR(50),`...
SELECT T1.customer_id , T2.customer_first_name , T2.customer_last_name FROM Customers_cards AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY count(*) ASC LIMIT 1
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Return the id and full name of the customer who has the fewest accounts., schema:CREATE TABLE `Accounts` (`account_id` INTEGER PRIMARY KEY,`customer_id` INTEGER NOT NULL,`account_name` VARCHAR(50),`oth...
SELECT T1.customer_id , T2.customer_first_name , T2.customer_last_name FROM Customers_cards AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY count(*) ASC LIMIT 1
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Show all card type codes and the number of cards in each type., schema:CREATE TABLE `Accounts` (`account_id` INTEGER PRIMARY KEY,`customer_id` INTEGER NOT NULL,`account_name` VARCHAR(50),`other_account...
SELECT card_type_code , count(*) FROM Customers_cards GROUP BY card_type_code
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What are the different card types, and how many cards are there of each?, schema:CREATE TABLE `Accounts` (`account_id` INTEGER PRIMARY KEY,`customer_id` INTEGER NOT NULL,`account_name` VARCHAR(50),`oth...
SELECT card_type_code , count(*) FROM Customers_cards GROUP BY card_type_code
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What is the card type code with most number of cards?, schema:CREATE TABLE `Accounts` (`account_id` INTEGER PRIMARY KEY,`customer_id` INTEGER NOT NULL,`account_name` VARCHAR(50),`other_account_details`...
SELECT card_type_code FROM Customers_cards GROUP BY card_type_code ORDER BY count(*) DESC LIMIT 1
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Return the code of the card type that is most common., schema:CREATE TABLE `Accounts` (`account_id` INTEGER PRIMARY KEY,`customer_id` INTEGER NOT NULL,`account_name` VARCHAR(50),`other_account_details`...
SELECT card_type_code FROM Customers_cards GROUP BY card_type_code ORDER BY count(*) DESC LIMIT 1
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Show card type codes with at least 5 cards., schema:CREATE TABLE `Accounts` (`account_id` INTEGER PRIMARY KEY,`customer_id` INTEGER NOT NULL,`account_name` VARCHAR(50),`other_account_details` VARCHAR(2...
SELECT card_type_code FROM Customers_cards GROUP BY card_type_code HAVING count(*) >= 5
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What are the codes of card types that have 5 or more cards?, schema:CREATE TABLE `Accounts` (`account_id` INTEGER PRIMARY KEY,`customer_id` INTEGER NOT NULL,`account_name` VARCHAR(50),`other_account_de...
SELECT card_type_code FROM Customers_cards GROUP BY card_type_code HAVING count(*) >= 5
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Show all card type codes and the number of customers holding cards in each type., schema:CREATE TABLE `Accounts` (`account_id` INTEGER PRIMARY KEY,`customer_id` INTEGER NOT NULL,`account_name` VARCHAR(...
SELECT card_type_code , count(DISTINCT customer_id) FROM Customers_cards GROUP BY card_type_code
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What are the different card type codes, and how many different customers hold each type?, schema:CREATE TABLE `Accounts` (`account_id` INTEGER PRIMARY KEY,`customer_id` INTEGER NOT NULL,`account_name` ...
SELECT card_type_code , count(DISTINCT customer_id) FROM Customers_cards GROUP BY card_type_code
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Show the customer ids and firstname without a credit card., schema:CREATE TABLE `Accounts` (`account_id` INTEGER PRIMARY KEY,`customer_id` INTEGER NOT NULL,`account_name` VARCHAR(50),`other_account_det...
SELECT customer_id , customer_first_name FROM Customers EXCEPT SELECT T1.customer_id , T2.customer_first_name FROM Customers_cards AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE card_type_code = "Credit"
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What are the ids and first names of customers who do not hold a credit card?, schema:CREATE TABLE `Accounts` (`account_id` INTEGER PRIMARY KEY,`customer_id` INTEGER NOT NULL,`account_name` VARCHAR(50),...
SELECT customer_id , customer_first_name FROM Customers EXCEPT SELECT T1.customer_id , T2.customer_first_name FROM Customers_cards AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE card_type_code = "Credit"
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Show all card type codes., schema:CREATE TABLE `Accounts` (`account_id` INTEGER PRIMARY KEY,`customer_id` INTEGER NOT NULL,`account_name` VARCHAR(50),`other_account_details` VARCHAR(255)); CREATE TABLE...
SELECT DISTINCT card_type_code FROM Customers_Cards
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What are the different card type codes?, schema:CREATE TABLE `Accounts` (`account_id` INTEGER PRIMARY KEY,`customer_id` INTEGER NOT NULL,`account_name` VARCHAR(50),`other_account_details` VARCHAR(255))...
SELECT DISTINCT card_type_code FROM Customers_Cards
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Show the number of card types., schema:CREATE TABLE `Accounts` (`account_id` INTEGER PRIMARY KEY,`customer_id` INTEGER NOT NULL,`account_name` VARCHAR(50),`other_account_details` VARCHAR(255)); CREATE ...
SELECT count(DISTINCT card_type_code) FROM Customers_Cards
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:How many different card types are there?, schema:CREATE TABLE `Accounts` (`account_id` INTEGER PRIMARY KEY,`customer_id` INTEGER NOT NULL,`account_name` VARCHAR(50),`other_account_details` VARCHAR(255)...
SELECT count(DISTINCT card_type_code) FROM Customers_Cards
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Show all transaction types., schema:CREATE TABLE `Accounts` (`account_id` INTEGER PRIMARY KEY,`customer_id` INTEGER NOT NULL,`account_name` VARCHAR(50),`other_account_details` VARCHAR(255)); CREATE TAB...
SELECT DISTINCT transaction_type FROM Financial_Transactions
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What are the different types of transactions?, schema:CREATE TABLE `Accounts` (`account_id` INTEGER PRIMARY KEY,`customer_id` INTEGER NOT NULL,`account_name` VARCHAR(50),`other_account_details` VARCHAR...
SELECT DISTINCT transaction_type FROM Financial_Transactions
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Show the number of transaction types., schema:CREATE TABLE `Accounts` (`account_id` INTEGER PRIMARY KEY,`customer_id` INTEGER NOT NULL,`account_name` VARCHAR(50),`other_account_details` VARCHAR(255)); ...
SELECT count(DISTINCT transaction_type) FROM Financial_Transactions
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:How many different types of transactions are there?, schema:CREATE TABLE `Accounts` (`account_id` INTEGER PRIMARY KEY,`customer_id` INTEGER NOT NULL,`account_name` VARCHAR(50),`other_account_details` V...
SELECT count(DISTINCT transaction_type) FROM Financial_Transactions
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What is the average and total transaction amount?, schema:CREATE TABLE `Accounts` (`account_id` INTEGER PRIMARY KEY,`customer_id` INTEGER NOT NULL,`account_name` VARCHAR(50),`other_account_details` VAR...
SELECT avg(transaction_amount) , sum(transaction_amount) FROM Financial_transactions
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Return the average transaction amount, as well as the total amount of all transactions., schema:CREATE TABLE `Accounts` (`account_id` INTEGER PRIMARY KEY,`customer_id` INTEGER NOT NULL,`account_name` V...
SELECT avg(transaction_amount) , sum(transaction_amount) FROM Financial_transactions
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Show the card type codes and the number of transactions., schema:CREATE TABLE `Accounts` (`account_id` INTEGER PRIMARY KEY,`customer_id` INTEGER NOT NULL,`account_name` VARCHAR(50),`other_account_detai...
SELECT T2.card_type_code , count(*) FROM Financial_transactions AS T1 JOIN Customers_cards AS T2 ON T1.card_id = T2.card_id GROUP BY T2.card_type_code
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What are the different card types, and how many transactions have been made with each?, schema:CREATE TABLE `Accounts` (`account_id` INTEGER PRIMARY KEY,`customer_id` INTEGER NOT NULL,`account_name` VA...
SELECT T2.card_type_code , count(*) FROM Financial_transactions AS T1 JOIN Customers_cards AS T2 ON T1.card_id = T2.card_id GROUP BY T2.card_type_code
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Show the transaction type and the number of transactions., schema:CREATE TABLE `Accounts` (`account_id` INTEGER PRIMARY KEY,`customer_id` INTEGER NOT NULL,`account_name` VARCHAR(50),`other_account_deta...
SELECT transaction_type , count(*) FROM Financial_transactions GROUP BY transaction_type
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What are the different transaction types, and how many transactions of each have taken place?, schema:CREATE TABLE `Accounts` (`account_id` INTEGER PRIMARY KEY,`customer_id` INTEGER NOT NULL,`account_n...
SELECT transaction_type , count(*) FROM Financial_transactions GROUP BY transaction_type
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What is the transaction type that has processed the greatest total amount in transactions?, schema:CREATE TABLE `Accounts` (`account_id` INTEGER PRIMARY KEY,`customer_id` INTEGER NOT NULL,`account_name...
SELECT transaction_type FROM Financial_transactions GROUP BY transaction_type ORDER BY sum(transaction_amount) DESC LIMIT 1
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Return the type of transaction with the highest total amount., schema:CREATE TABLE `Accounts` (`account_id` INTEGER PRIMARY KEY,`customer_id` INTEGER NOT NULL,`account_name` VARCHAR(50),`other_account_...
SELECT transaction_type FROM Financial_transactions GROUP BY transaction_type ORDER BY sum(transaction_amount) DESC LIMIT 1
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Show the account id and the number of transactions for each account, schema:CREATE TABLE `Accounts` (`account_id` INTEGER PRIMARY KEY,`customer_id` INTEGER NOT NULL,`account_name` VARCHAR(50),`other_ac...
SELECT account_id , count(*) FROM Financial_transactions GROUP BY account_id
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What are the different account ids that have made financial transactions, as well as how many transactions correspond to each?, schema:CREATE TABLE `Accounts` (`account_id` INTEGER PRIMARY KEY,`custome...
SELECT account_id , count(*) FROM Financial_transactions GROUP BY account_id
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:How many tracks do we have?, schema:CREATE TABLE "race" ("Race_ID" int,"Name" text,"Class" text,"Date" text,"Track_ID" text,PRIMARY KEY ("Race_ID"),FOREIGN KEY ("Track_ID") REFERENCES "track"("Track_ID...
SELECT count(*) FROM track
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Count the number of tracks., schema:CREATE TABLE "race" ("Race_ID" int,"Name" text,"Class" text,"Date" text,"Track_ID" text,PRIMARY KEY ("Race_ID"),FOREIGN KEY ("Track_ID") REFERENCES "track"("Track_ID...
SELECT count(*) FROM track
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Show the name and location for all tracks., schema:CREATE TABLE "race" ("Race_ID" int,"Name" text,"Class" text,"Date" text,"Track_ID" text,PRIMARY KEY ("Race_ID"),FOREIGN KEY ("Track_ID") REFERENCES "t...
SELECT name , LOCATION FROM track
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What are the names and locations of all tracks?, schema:CREATE TABLE "race" ("Race_ID" int,"Name" text,"Class" text,"Date" text,"Track_ID" text,PRIMARY KEY ("Race_ID"),FOREIGN KEY ("Track_ID") REFERENC...
SELECT name , LOCATION FROM track
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Show names and seatings, ordered by seating for all tracks opened after 2000., schema:CREATE TABLE "race" ("Race_ID" int,"Name" text,"Class" text,"Date" text,"Track_ID" text,PRIMARY KEY ("Race_ID"),FOR...
SELECT name , seating FROM track WHERE year_opened > 2000 ORDER BY seating
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What are the names and seatings for all tracks opened after 2000, ordered by seating?, schema:CREATE TABLE "race" ("Race_ID" int,"Name" text,"Class" text,"Date" text,"Track_ID" text,PRIMARY KEY ("Race_...
SELECT name , seating FROM track WHERE year_opened > 2000 ORDER BY seating
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What is the name, location and seating for the most recently opened track?, schema:CREATE TABLE "race" ("Race_ID" int,"Name" text,"Class" text,"Date" text,"Track_ID" text,PRIMARY KEY ("Race_ID"),FOREIG...
SELECT name , LOCATION , seating FROM track ORDER BY year_opened DESC LIMIT 1
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Return the name, location, and seating of the track that was opened in the most recent year., schema:CREATE TABLE "race" ("Race_ID" int,"Name" text,"Class" text,"Date" text,"Track_ID" text,PRIMARY KEY ...
SELECT name , LOCATION , seating FROM track ORDER BY year_opened DESC LIMIT 1
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What is the minimum, maximum, and average seating for all tracks., schema:CREATE TABLE "race" ("Race_ID" int,"Name" text,"Class" text,"Date" text,"Track_ID" text,PRIMARY KEY ("Race_ID"),FOREIGN KEY ("T...
SELECT min(seating) , max(seating) , avg(seating) FROM track
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Return the minimum, maximum, and average seating across all tracks., schema:CREATE TABLE "race" ("Race_ID" int,"Name" text,"Class" text,"Date" text,"Track_ID" text,PRIMARY KEY ("Race_ID"),FOREIGN KEY (...
SELECT min(seating) , max(seating) , avg(seating) FROM track
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Show the name, location, open year for all tracks with a seating higher than the average., schema:CREATE TABLE "race" ("Race_ID" int,"Name" text,"Class" text,"Date" text,"Track_ID" text,PRIMARY KEY ("R...
SELECT name , LOCATION , year_opened FROM track WHERE seating > (SELECT avg(seating) FROM track)
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What are the names, locations, and years of opening for tracks with seating higher than average?, schema:CREATE TABLE "race" ("Race_ID" int,"Name" text,"Class" text,"Date" text,"Track_ID" text,PRIMARY ...
SELECT name , LOCATION , year_opened FROM track WHERE seating > (SELECT avg(seating) FROM track)
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What are distinct locations where tracks are located?, schema:CREATE TABLE "race" ("Race_ID" int,"Name" text,"Class" text,"Date" text,"Track_ID" text,PRIMARY KEY ("Race_ID"),FOREIGN KEY ("Track_ID") RE...
SELECT DISTINCT LOCATION FROM track
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Give the different locations of tracks., schema:CREATE TABLE "race" ("Race_ID" int,"Name" text,"Class" text,"Date" text,"Track_ID" text,PRIMARY KEY ("Race_ID"),FOREIGN KEY ("Track_ID") REFERENCES "trac...
SELECT DISTINCT LOCATION FROM track
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:How many races are there?, schema:CREATE TABLE "race" ("Race_ID" int,"Name" text,"Class" text,"Date" text,"Track_ID" text,PRIMARY KEY ("Race_ID"),FOREIGN KEY ("Track_ID") REFERENCES "track"("Track_ID")...
SELECT count(*) FROM race
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Count the number of races., schema:CREATE TABLE "race" ("Race_ID" int,"Name" text,"Class" text,"Date" text,"Track_ID" text,PRIMARY KEY ("Race_ID"),FOREIGN KEY ("Track_ID") REFERENCES "track"("Track_ID"...
SELECT count(*) FROM race
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What are the distinct classes that races can have?, schema:CREATE TABLE "race" ("Race_ID" int,"Name" text,"Class" text,"Date" text,"Track_ID" text,PRIMARY KEY ("Race_ID"),FOREIGN KEY ("Track_ID") REFER...
SELECT DISTINCT CLASS FROM race
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Return the different classes of races., schema:CREATE TABLE "race" ("Race_ID" int,"Name" text,"Class" text,"Date" text,"Track_ID" text,PRIMARY KEY ("Race_ID"),FOREIGN KEY ("Track_ID") REFERENCES "track...
SELECT DISTINCT CLASS FROM race
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Show name, class, and date for all races., schema:CREATE TABLE "race" ("Race_ID" int,"Name" text,"Class" text,"Date" text,"Track_ID" text,PRIMARY KEY ("Race_ID"),FOREIGN KEY ("Track_ID") REFERENCES "tr...
SELECT name , CLASS , date FROM race
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What are the names, classes, and dates for all races?, schema:CREATE TABLE "race" ("Race_ID" int,"Name" text,"Class" text,"Date" text,"Track_ID" text,PRIMARY KEY ("Race_ID"),FOREIGN KEY ("Track_ID") RE...
SELECT name , CLASS , date FROM race
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Show the race class and number of races in each class., schema:CREATE TABLE "race" ("Race_ID" int,"Name" text,"Class" text,"Date" text,"Track_ID" text,PRIMARY KEY ("Race_ID"),FOREIGN KEY ("Track_ID") R...
SELECT CLASS , count(*) FROM race GROUP BY CLASS
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What are the different classes of races, and how many races correspond to each?, schema:CREATE TABLE "race" ("Race_ID" int,"Name" text,"Class" text,"Date" text,"Track_ID" text,PRIMARY KEY ("Race_ID"),F...
SELECT CLASS , count(*) FROM race GROUP BY CLASS
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What is the race class with most number of races., schema:CREATE TABLE "race" ("Race_ID" int,"Name" text,"Class" text,"Date" text,"Track_ID" text,PRIMARY KEY ("Race_ID"),FOREIGN KEY ("Track_ID") REFERE...
SELECT CLASS FROM race GROUP BY CLASS ORDER BY count(*) DESC LIMIT 1
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Give the class of races that is most common., schema:CREATE TABLE "race" ("Race_ID" int,"Name" text,"Class" text,"Date" text,"Track_ID" text,PRIMARY KEY ("Race_ID"),FOREIGN KEY ("Track_ID") REFERENCES ...
SELECT CLASS FROM race GROUP BY CLASS ORDER BY count(*) DESC LIMIT 1
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:List the race class with at least two races., schema:CREATE TABLE "race" ("Race_ID" int,"Name" text,"Class" text,"Date" text,"Track_ID" text,PRIMARY KEY ("Race_ID"),FOREIGN KEY ("Track_ID") REFERENCES ...
SELECT CLASS FROM race GROUP BY CLASS HAVING count(*) >= 2
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What are the classes of races that have two or more corresponding races?, schema:CREATE TABLE "race" ("Race_ID" int,"Name" text,"Class" text,"Date" text,"Track_ID" text,PRIMARY KEY ("Race_ID"),FOREIGN ...
SELECT CLASS FROM race GROUP BY CLASS HAVING count(*) >= 2
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What are the names for tracks without a race in class 'GT'., schema:CREATE TABLE "race" ("Race_ID" int,"Name" text,"Class" text,"Date" text,"Track_ID" text,PRIMARY KEY ("Race_ID"),FOREIGN KEY ("Track_I...
SELECT name FROM track EXCEPT SELECT T2.name FROM race AS T1 JOIN track AS T2 ON T1.track_id = T2.track_id WHERE T1.class = 'GT'
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Give the names of tracks that do not have a race in the class 'GT'., schema:CREATE TABLE "race" ("Race_ID" int,"Name" text,"Class" text,"Date" text,"Track_ID" text,PRIMARY KEY ("Race_ID"),FOREIGN KEY (...
SELECT name FROM track EXCEPT SELECT T2.name FROM race AS T1 JOIN track AS T2 ON T1.track_id = T2.track_id WHERE T1.class = 'GT'
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Show all track names that have had no races., schema:CREATE TABLE "race" ("Race_ID" int,"Name" text,"Class" text,"Date" text,"Track_ID" text,PRIMARY KEY ("Race_ID"),FOREIGN KEY ("Track_ID") REFERENCES ...
SELECT name FROM track WHERE track_id NOT IN (SELECT track_id FROM race)
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Return the names of tracks that have no had any races., schema:CREATE TABLE "race" ("Race_ID" int,"Name" text,"Class" text,"Date" text,"Track_ID" text,PRIMARY KEY ("Race_ID"),FOREIGN KEY ("Track_ID") R...
SELECT name FROM track WHERE track_id NOT IN (SELECT track_id FROM race)
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Show year where a track with a seating at least 5000 opened and a track with seating no more than 4000 opened., schema:CREATE TABLE "race" ("Race_ID" int,"Name" text,"Class" text,"Date" text,"Track_ID"...
SELECT year_opened FROM track WHERE seating BETWEEN 4000 AND 5000
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What are the years of opening for tracks with seating between 4000 and 5000?, schema:CREATE TABLE "race" ("Race_ID" int,"Name" text,"Class" text,"Date" text,"Track_ID" text,PRIMARY KEY ("Race_ID"),FORE...
SELECT year_opened FROM track WHERE seating BETWEEN 4000 AND 5000
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Show the name of track and the number of races in each track., schema:CREATE TABLE "race" ("Race_ID" int,"Name" text,"Class" text,"Date" text,"Track_ID" text,PRIMARY KEY ("Race_ID"),FOREIGN KEY ("Track...
SELECT T2.name , count(*) FROM race AS T1 JOIN track AS T2 ON T1.track_id = T2.track_id GROUP BY T1.track_id
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What are the names of different tracks, and how many races has each had?, schema:CREATE TABLE "race" ("Race_ID" int,"Name" text,"Class" text,"Date" text,"Track_ID" text,PRIMARY KEY ("Race_ID"),FOREIGN ...
SELECT T2.name , count(*) FROM race AS T1 JOIN track AS T2 ON T1.track_id = T2.track_id GROUP BY T1.track_id
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Show the name of track with most number of races., schema:CREATE TABLE "race" ("Race_ID" int,"Name" text,"Class" text,"Date" text,"Track_ID" text,PRIMARY KEY ("Race_ID"),FOREIGN KEY ("Track_ID") REFERE...
SELECT T2.name FROM race AS T1 JOIN track AS T2 ON T1.track_id = T2.track_id GROUP BY T1.track_id ORDER BY count(*) DESC LIMIT 1
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What is the name of the track that has had the greatest number of races?, schema:CREATE TABLE "race" ("Race_ID" int,"Name" text,"Class" text,"Date" text,"Track_ID" text,PRIMARY KEY ("Race_ID"),FOREIGN ...
SELECT T2.name FROM race AS T1 JOIN track AS T2 ON T1.track_id = T2.track_id GROUP BY T1.track_id ORDER BY count(*) DESC LIMIT 1
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Show the name and date for each race and its track name., schema:CREATE TABLE "race" ("Race_ID" int,"Name" text,"Class" text,"Date" text,"Track_ID" text,PRIMARY KEY ("Race_ID"),FOREIGN KEY ("Track_ID")...
SELECT T1.name , T1.date , T2.name FROM race AS T1 JOIN track AS T2 ON T1.track_id = T2.track_id
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What are the names and dates of races, and the names of the tracks where they are held?, schema:CREATE TABLE "race" ("Race_ID" int,"Name" text,"Class" text,"Date" text,"Track_ID" text,PRIMARY KEY ("Rac...
SELECT T1.name , T1.date , T2.name FROM race AS T1 JOIN track AS T2 ON T1.track_id = T2.track_id
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Show the name and location of track with 1 race., schema:CREATE TABLE "race" ("Race_ID" int,"Name" text,"Class" text,"Date" text,"Track_ID" text,PRIMARY KEY ("Race_ID"),FOREIGN KEY ("Track_ID") REFEREN...
SELECT T2.name , T2.location FROM race AS T1 JOIN track AS T2 ON T1.track_id = T2.track_id GROUP BY T1.track_id HAVING count(*) = 1
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What are the names and locations of tracks that have had exactly 1 race?, schema:CREATE TABLE "race" ("Race_ID" int,"Name" text,"Class" text,"Date" text,"Track_ID" text,PRIMARY KEY ("Race_ID"),FOREIGN ...
SELECT T2.name , T2.location FROM race AS T1 JOIN track AS T2 ON T1.track_id = T2.track_id GROUP BY T1.track_id HAVING count(*) = 1
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Find the locations where have both tracks with more than 90000 seats and tracks with less than 70000 seats., schema:CREATE TABLE "race" ("Race_ID" int,"Name" text,"Class" text,"Date" text,"Track_ID" te...
SELECT LOCATION FROM track WHERE seating > 90000 INTERSECT SELECT LOCATION FROM track WHERE seating < 70000
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What are the locations that have both tracks with more than 90000 seats, and tracks with fewer than 70000 seats?, schema:CREATE TABLE "race" ("Race_ID" int,"Name" text,"Class" text,"Date" text,"Track_I...
SELECT LOCATION FROM track WHERE seating > 90000 INTERSECT SELECT LOCATION FROM track WHERE seating < 70000
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:How many members have the black membership card?, schema:CREATE TABLE "shop" ("Shop_ID" int,"Address" text,"Num_of_staff" text,"Score" real,"Open_Year" text,PRIMARY KEY ("Shop_ID")); CREATE TABLE "memb...
SELECT count(*) FROM member WHERE Membership_card = 'Black'
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Find the number of members living in each address., schema:CREATE TABLE "shop" ("Shop_ID" int,"Address" text,"Num_of_staff" text,"Score" real,"Open_Year" text,PRIMARY KEY ("Shop_ID")); CREATE TABLE "me...
SELECT count(*) , address FROM member GROUP BY address
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Give me the names of members whose address is in Harford or Waterbury., schema:CREATE TABLE "shop" ("Shop_ID" int,"Address" text,"Num_of_staff" text,"Score" real,"Open_Year" text,PRIMARY KEY ("Shop_ID"...
SELECT name FROM member WHERE address = 'Harford' OR address = 'Waterbury'
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Find the ids and names of members who are under age 30 or with black membership card., schema:CREATE TABLE "shop" ("Shop_ID" int,"Address" text,"Num_of_staff" text,"Score" real,"Open_Year" text,PRIMARY...
SELECT name , member_id FROM member WHERE Membership_card = 'Black' OR age < 30
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Find the purchase time, age and address of each member, and show the results in the order of purchase time., schema:CREATE TABLE "shop" ("Shop_ID" int,"Address" text,"Num_of_staff" text,"Score" real,"O...
SELECT Time_of_purchase , age , address FROM member ORDER BY Time_of_purchase
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Which membership card has more than 5 members?, schema:CREATE TABLE "shop" ("Shop_ID" int,"Address" text,"Num_of_staff" text,"Score" real,"Open_Year" text,PRIMARY KEY ("Shop_ID")); CREATE TABLE "member...
SELECT Membership_card FROM member GROUP BY Membership_card HAVING count(*) > 5
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Which address has both members younger than 30 and members older than 40?, schema:CREATE TABLE "shop" ("Shop_ID" int,"Address" text,"Num_of_staff" text,"Score" real,"Open_Year" text,PRIMARY KEY ("Shop_...
SELECT address FROM member WHERE age < 30 INTERSECT SELECT address FROM member WHERE age > 40
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What is the membership card held by both members living in Hartford and ones living in Waterbury address?, schema:CREATE TABLE "shop" ("Shop_ID" int,"Address" text,"Num_of_staff" text,"Score" real,"Ope...
SELECT membership_card FROM member WHERE address = 'Hartford' INTERSECT SELECT membership_card FROM member WHERE address = 'Waterbury'
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:How many members are not living in Hartford?, schema:CREATE TABLE "shop" ("Shop_ID" int,"Address" text,"Num_of_staff" text,"Score" real,"Open_Year" text,PRIMARY KEY ("Shop_ID")); CREATE TABLE "member" ...
SELECT count(*) FROM member WHERE address != 'Hartford'
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Which address do not have any member with the black membership card?, schema:CREATE TABLE "shop" ("Shop_ID" int,"Address" text,"Num_of_staff" text,"Score" real,"Open_Year" text,PRIMARY KEY ("Shop_ID"))...
SELECT address FROM member EXCEPT SELECT address FROM member WHERE Membership_card = 'Black'
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Show the shop addresses ordered by their opening year., schema:CREATE TABLE "shop" ("Shop_ID" int,"Address" text,"Num_of_staff" text,"Score" real,"Open_Year" text,PRIMARY KEY ("Shop_ID")); CREATE TABLE...
SELECT address FROM shop ORDER BY open_year