ajayk007/querysmith-spider-bird huggingface dataset:
system: You are a text-to-SQL generator. Given a database schema and a question, reply with a single valid SQLite query that answers it. Output only the SQL on one line, with no explanation and no markdown.

user: Schema:
CREATE TABLE Categories (
  CategoryID integer PRIMARY KEY,
  CategoryName text,
  Description text
);
CREATE TABLE Customers (
  CustomerID integer PRIMARY KEY,
  CustomerName text,
  ContactName text,
  Address text,
  City text,
  PostalCode text,
  Country text
);
CREATE TABLE Employees (
  EmployeeID integer PRIMARY KEY,
  LastName text,
  FirstName text,
  BirthDate date,
  Photo text,
  Notes text
);
CREATE TABLE Shippers (
  ShipperID integer PRIMARY KEY,
  ShipperName text,
  Phone text
);
CREATE TABLE Suppliers (
  SupplierID integer PRIMARY KEY,
  SupplierName text,
  ContactName text,
  Address text,
  City text,
  PostalCode text,
  Country text,
  Phone text
);
CREATE TABLE Products (
  ProductID integer PRIMARY KEY,
  ProductName text,
  SupplierID integer,
  CategoryID integer,
  Unit text,
  Price real
);
CREATE TABLE Orders (
  OrderID integer PRIMARY KEY,
  CustomerID integer,
  EmployeeID integer,
  OrderDate datetime,
  ShipperID integer
);
CREATE TABLE OrderDetails (
  OrderDetailID integer PRIMARY KEY,
  OrderID integer,
  ProductID integer,
  Quantity integer
);
-- foreign keys: Products.SupplierID -> Suppliers.SupplierID; Products.CategoryID -> Categories.CategoryID; Orders.ShipperID -> Shippers.ShipperID; Orders.CustomerID -> Customers.CustomerID; Orders.EmployeeID -> Employees.EmployeeID; OrderDetails.ProductID -> Products.ProductID; OrderDetails.OrderID -> Orders.OrderID

Hint: "Seafood" is the CategoryName; order quantity of more than 50 refers to Quantity > 50

Question: Among the seafoods, how many of them have an order quantity of more than 50?

assistant: SELECT COUNT(T1.ProductID) FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.ProductID INNER JOIN Categories AS T3 ON T1.CategoryID = T3.CategoryID WHERE T3.CategoryName = 'Seafood' AND T2.Quantity > 50
system: You are a text-to-SQL generator. Given a database schema and a question, reply with a single valid SQLite query that answers it. Output only the SQL on one line, with no explanation and no markdown.

user: Schema:
CREATE TABLE CBSA (
  CBSA integer PRIMARY KEY,
  CBSA_name text,
  CBSA_type text
);
CREATE TABLE state (
  abbreviation text PRIMARY KEY,
  name text
);
CREATE TABLE congress (
  cognress_rep_id text PRIMARY KEY,
  first_name text,
  last_name text,
  CID text,
  party text,
  state text,
  abbreviation text,
  House text,
  District integer,
  land_area real
);
CREATE TABLE zip_data (
  zip_code integer PRIMARY KEY,
  city text,
  state text,
  multi_county text,
  type text,
  organization text,
  time_zone text,
  daylight_savings text,
  latitude real,
  longitude real,
  elevation integer,
  state_fips integer,
  county_fips integer,
  region text,
  division text,
  population_2020 integer,
  population_2010 integer,
  households integer,
  avg_house_value integer,
  avg_income_per_household integer,
  persons_per_household real,
  white_population integer,
  black_population integer,
  hispanic_population integer,
  asian_population integer,
  american_indian_population integer,
  hawaiian_population integer,
  other_population integer,
  male_population integer,
  female_population integer,
  median_age real,
  male_median_age real,
  female_median_age real,
  residential_mailboxes integer,
  business_mailboxes integer,
  total_delivery_receptacles integer,
  businesses integer,
  1st_quarter_payroll integer,
  annual_payroll integer,
  employees integer,
  water_area real,
  land_area real,
  single_family_delivery_units integer,
  multi_family_delivery_units integer,
  total_beneficiaries integer,
  retired_workers integer,
  disabled_workers integer,
  parents_and_widowed integer,
  spouses integer,
  children integer,
  over_65 integer,
  monthly_benefits_all integer,
  monthly_benefits_retired_workers integer,
  monthly_benefits_widowed integer,
  CBSA integer
);
CREATE TABLE alias (
  zip_code integer PRIMARY KEY,
  alias text
);
CREATE TABLE area_code (
  zip_code integer PRIMARY KEY,
  area_code integer PRIMARY KEY
);
CREATE TABLE avoid (
  zip_code integer PRIMARY KEY,
  bad_alias text PRIMARY KEY
);
CREATE TABLE country (
  zip_code integer PRIMARY KEY,
  county text PRIMARY KEY,
  state text
);
CREATE TABLE zip_congress (
  zip_code integer PRIMARY KEY,
  district text PRIMARY KEY
);
-- foreign keys: congress.abbreviation -> state.abbreviation; zip_data.CBSA -> CBSA.CBSA; zip_data.state -> state.abbreviation; alias.zip_code -> zip_data.zip_code; area_code.zip_code -> zip_data.zip_code; avoid.zip_code -> zip_data.zip_code; country.state -> state.abbreviation; country.zip_code -> zip_data.zip_code; zip_congress.zip_code -> zip_data.zip_code; zip_congress.district -> congress.cognress_rep_id

Question: Provide the city where zip code 19019 is located and the alias of that city.

assistant: SELECT T2.city, T1.alias FROM alias AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T1.zip_code = 19019
system: You are a text-to-SQL generator. Given a database schema and a question, reply with a single valid SQLite query that answers it. Output only the SQL on one line, with no explanation and no markdown.

user: Schema:
PRAGMA foreign_keys = ON;
CREATE TABLE `Addresses` (
`address_id` INTEGER PRIMARY KEY,
`address_details` VARCHAR(255)
);

Question: What are the staff ids and genders of all staffs whose job title is Department Manager?

assistant: SELECT T1.staff_id , T1.staff_gender FROM staff AS T1 JOIN staff_department_assignments AS T2 ON T1.staff_id = T2.staff_id WHERE T2.job_title_code = "Department Manager"
system: You are a text-to-SQL generator. Given a database schema and a question, reply with a single valid SQLite query that answers it. Output only the SQL on one line, with no explanation and no markdown.

user: Schema:
CREATE TABLE coins (
  id integer PRIMARY KEY,
  name text,
  slug text,
  symbol text,
  status text,
  category text,
  description text,
  subreddit text,
  notice text,
  tags text,
  tag_names text,
  website text,
  platform_id integer,
  date_added text,
  date_launched text
);
CREATE TABLE historical (
  date date,
  coin_id integer,
  cmc_rank integer,
  market_cap real,
  price real,
  open real,
  high real,
  low real,
  close real,
  time_high text,
  time_low text,
  volume_24h real,
  percent_change_1h real,
  percent_change_24h real,
  percent_change_7d real,
  circulating_supply real,
  total_supply real,
  max_supply real,
  num_market_pairs integer
);

Hint: the top five coins refers to cmc_rank< = 5; on January 1, 2014 refers to date = '2014-01-01'

Question: List the names of the top five coins traded on January 1, 2014.

assistant: SELECT T1.name FROM coins AS T1 INNER JOIN historical AS T2 ON T1.id = T2.coin_id WHERE T2.date = '2014-01-01' AND T2.cmc_rank <= 5
system: You are a text-to-SQL generator. Given a database schema and a question, reply with a single valid SQLite query that answers it. Output only the SQL on one line, with no explanation and no markdown.

user: Schema:
PRAGMA foreign_keys = ON;
CREATE TABLE `Addresses` (
`address_id` INTEGER PRIMARY KEY,
`address_details` VARCHAR(255)
);

Question: Find the id and name of customers whose address contains WY state and do not use credit card for payment.

assistant: SELECT customer_id , customer_name FROM customers WHERE customer_address LIKE "%WY%" AND payment_method_code != "Credit Card"
system: You are a text-to-SQL generator. Given a database schema and a question, reply with a single valid SQLite query that answers it. Output only the SQL on one line, with no explanation and no markdown.

user: Schema:
CREATE TABLE Dish (
  id integer PRIMARY KEY,
  name text,
  description text,
  menus_appeared integer,
  times_appeared integer,
  first_appeared integer,
  last_appeared integer,
  lowest_price real,
  highest_price real
);
CREATE TABLE Menu (
  id integer PRIMARY KEY,
  name text,
  sponsor text,
  event text,
  venue text,
  place text,
  physical_description text,
  occasion text,
  notes text,
  call_number text,
  keywords text,
  language text,
  date date,
  location text,
  location_type text,
  currency text,
  currency_symbol text,
  status text,
  page_count integer,
  dish_count integer
);
CREATE TABLE MenuPage (
  id integer PRIMARY KEY,
  menu_id integer,
  page_number integer,
  image_id real,
  full_height integer,
  full_width integer,
  uuid text
);
CREATE TABLE MenuItem (
  id integer PRIMARY KEY,
  menu_page_id integer,
  price real,
  high_price real,
  dish_id integer,
  created_at text,
  updated_at text,
  xpos real,
  ypos real
);
-- foreign keys: MenuPage.menu_id -> Menu.id; MenuItem.menu_page_id -> MenuPage.id; MenuItem.dish_id -> Dish.id

Hint: baked apples with cream is a name of dish; highest price refers to MAX(price);

Question: Among the menus that include baked apples with cream, who is the sponsor of the menu with the highest price?

assistant: SELECT T4.sponsor FROM MenuPage AS T1 INNER JOIN MenuItem AS T2 ON T1.id = T2.menu_page_id INNER JOIN Dish AS T3 ON T2.dish_id = T3.id INNER JOIN Menu AS T4 ON T4.id = T1.menu_id WHERE T3.name = 'Baked apples with cream' AND T3.id = 107 ORDER BY T2.price DESC LIMIT 1
system: You are a text-to-SQL generator. Given a database schema and a question, reply with a single valid SQLite query that answers it. Output only the SQL on one line, with no explanation and no markdown.

user: Schema:
PRAGMA foreign_keys = ON;


CREATE TABLE "program" (
"Program_ID" int,
"Name" text,
"Origin" text,
"Launch" real,
"Owner" text,
PRIMARY KEY ("Program_ID")
);


CREATE TABLE "channel" (
"Channel_ID" int,
"Name" text,
"Owner" text,
"Share_in_percent" real,
"Rating_in_percent" real,
PRIMARY KEY ("Channel_ID")
);

Question: find the total percentage share of all channels owned by CCTV.

assistant: SELECT sum(Share_in_percent) FROM channel WHERE OWNER = 'CCTV'
system: You are a text-to-SQL generator. Given a database schema and a question, reply with a single valid SQLite query that answers it. Output only the SQL on one line, with no explanation and no markdown.

user: Schema:
CREATE TABLE "list" ( 
	"LastName" TEXT, 
	"FirstName" TEXT, 
	"Grade" INTEGER, 
	"Classroom" INTEGER,
	PRIMARY KEY(LastName, FirstName)
);
CREATE TABLE "teachers" ( 
	"LastName" TEXT, 
	"FirstName" TEXT, 
	"Classroom" INTEGER,
	PRIMARY KEY(LastName, FirstName)
);

Question: How many students does KAWA GORDON teaches?

assistant: SELECT count(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = "KAWA" AND T2.lastname = "GORDON"
system: You are a text-to-SQL generator. Given a database schema and a question, reply with a single valid SQLite query that answers it. Output only the SQL on one line, with no explanation and no markdown.

user: Schema:
PRAGMA foreign_keys = ON;


CREATE TABLE "company" (
"Company_ID" int,
"Rank" int,
"Company" text,
"Headquarters" text,
"Main_Industry" text,
"Sales_billion" real,
"Profits_billion" real,
"Assets_billion" real,
"Market_Value" real,
PRIMARY KEY ("Company_ID")
);

CREATE TABLE "gas_station" (
"Station_ID" int,
"Open_Year" int,
"Location" text,
"Manager_Name" text,
"Vice_Manager_Name" text,
"Representative_Name" text,
PRIMARY KEY ("Station_ID")
);

Question: Show all headquarters without a company in banking industry.

assistant: SELECT headquarters FROM company EXCEPT SELECT headquarters FROM company WHERE main_industry = 'Banking'
system: You are a text-to-SQL generator. Given a database schema and a question, reply with a single valid SQLite query that answers it. Output only the SQL on one line, with no explanation and no markdown.

user: Schema:
CREATE TABLE app_all (
  app_id integer PRIMARY KEY
);
CREATE TABLE app_events (
  event_id integer PRIMARY KEY,
  app_id integer PRIMARY KEY,
  is_installed integer,
  is_active integer
);
CREATE TABLE app_events_relevant (
  event_id integer PRIMARY KEY,
  app_id integer PRIMARY KEY,
  is_installed integer,
  is_active integer
);
CREATE TABLE app_labels (
  app_id integer,
  label_id integer
);
CREATE TABLE events (
  event_id integer PRIMARY KEY,
  device_id integer,
  timestamp datetime,
  longitude real,
  latitude real
);
CREATE TABLE events_relevant (
  event_id integer PRIMARY KEY,
  device_id integer,
  timestamp datetime,
  longitude real,
  latitude real
);
CREATE TABLE gender_age (
  device_id integer PRIMARY KEY,
  gender text,
  age integer,
  group text
);
CREATE TABLE gender_age_test (
  device_id integer PRIMARY KEY
);
CREATE TABLE gender_age_train (
  device_id integer PRIMARY KEY,
  gender text,
  age integer,
  group text
);
CREATE TABLE label_categories (
  label_id integer PRIMARY KEY,
  category text
);
CREATE TABLE phone_brand_device_model2 (
  device_id integer PRIMARY KEY,
  phone_brand text PRIMARY KEY,
  device_model text PRIMARY KEY
);
CREATE TABLE sample_submission (
  device_id integer PRIMARY KEY,
  F23- real,
  F24-26 real,
  F27-28 real,
  F29-32 real,
  F33-42 real,
  F43+ real,
  M22- real,
  M23-26 real,
  M27-28 real,
  M29-31 real,
  M32-38 real,
  M39+ real
);
-- foreign keys: app_events.event_id -> events.event_id; app_events_relevant.app_id -> app_all.app_id; app_events_relevant.event_id -> events_relevant.event_id; app_labels.app_id -> app_all.app_id; app_labels.label_id -> label_categories.label_id; events_relevant.device_id -> gender_age.device_id; gender_age.device_id -> phone_brand_device_model2.device_id

Question: List down the app IDs under the category of game-Rowing .

assistant: SELECT T2.app_id FROM label_categories AS T1 INNER JOIN app_labels AS T2 ON T1.label_id = T2.label_id WHERE T1.category = 'game-Rowing'
system: You are a text-to-SQL generator. Given a database schema and a question, reply with a single valid SQLite query that answers it. Output only the SQL on one line, with no explanation and no markdown.

user: Schema:
PRAGMA foreign_keys = ON;

CREATE TABLE "wrestler" (
"Wrestler_ID" int,
"Name" text,
"Reign" text,
"Days_held" text,
"Location" text,
"Event" text,
PRIMARY KEY ("Wrestler_ID")
);

CREATE TABLE "Elimination" (
"Elimination_ID" text,
"Wrestler_ID" text,
"Team" text,
"Eliminated_By" text,
"Elimination_Move" text,
"Time" text,
PRIMARY KEY ("Elimination_ID"),
FOREIGN KEY ("Wrestler_ID") REFERENCES "wrestler"("Wrestler_ID")
);

Question: Count the number of wrestlers.

assistant: SELECT count(*) FROM wrestler
system: You are a text-to-SQL generator. Given a database schema and a question, reply with a single valid SQLite query that answers it. Output only the SQL on one line, with no explanation and no markdown.

user: Schema:
PRAGMA foreign_keys = ON;

CREATE TABLE "city" (
"City_ID" int,
"Official_Name" text,
"Status" text,
"Area_km_2" real,
"Population" real,
"Census_Ranking" text,
PRIMARY KEY ("City_ID")
);

CREATE TABLE "farm" (
"Farm_ID" int,
"Year" int,
"Total_Horses" real,
"Working_Horses" real,
"Total_Cattle" real,
"Oxen" real,
"Bulls" real,
"Cows" real,
"Pigs" real,
"Sheep_and_Goats" real,
PRIMARY KEY ("Farm_ID")
);

CREATE TABLE "farm_competition" (
"Competition_ID" int,
"Year" int,
"Theme" text,
"Host_city_ID" int,
"Hosts" text,
PRIMARY KEY ("Competition_ID"),
FOREIGN KEY (`Host_city_ID`) REFERENCES `city`(`City_ID`)
);


CREATE TABLE "competition_record" (
"Competition_ID" int,
"Farm_ID" int,
"Rank" int,
PRIMARY KEY ("Competition_ID","Farm_ID"),
FOREIGN KEY (`Competition_ID`) REFERENCES `farm_competition`(`Competition_ID`),
FOREIGN KEY (`Farm_ID`) REFERENCES `farm`(`Farm_ID`)
);

Question: Return the different statuses of cities, ascending by frequency.

assistant: SELECT Status FROM city GROUP BY Status ORDER BY COUNT(*) ASC
system: You are a text-to-SQL generator. Given a database schema and a question, reply with a single valid SQLite query that answers it. Output only the SQL on one line, with no explanation and no markdown.

user: Schema:
CREATE TABLE Episode (
  episode_id text PRIMARY KEY,
  season integer,
  episode integer,
  number_in_series integer,
  title text,
  summary text,
  air_date text,
  episode_image text,
  rating real,
  votes integer
);
CREATE TABLE Person (
  name text PRIMARY KEY,
  birthdate text,
  birth_name text,
  birth_place text,
  birth_region text,
  birth_country text,
  height_meters real,
  nickname text
);
CREATE TABLE Award (
  award_id integer PRIMARY KEY,
  organization text,
  year integer,
  award_category text,
  award text,
  person text,
  role text,
  episode_id text,
  season text,
  song text,
  result text
);
CREATE TABLE Character_Award (
  award_id integer,
  character text
);
CREATE TABLE Credit (
  episode_id text,
  category text,
  person text,
  role text,
  credited text
);
CREATE TABLE Keyword (
  episode_id text PRIMARY KEY,
  keyword text PRIMARY KEY
);
CREATE TABLE Vote (
  episode_id text,
  stars integer,
  votes integer,
  percent real
);
-- foreign keys: Award.episode_id -> Episode.episode_id; Award.person -> Person.name; Character_Award.award_id -> Award.award_id; Credit.person -> Person.name; Credit.episode_id -> Episode.episode_id; Keyword.episode_id -> Episode.episode_id; Vote.episode_id -> Episode.episode_id

Hint: has nickname refers to nickname is NOT NULL

Question: List down person's name who has nickname.

assistant: SELECT name FROM Person WHERE nickname IS NOT NULL;
system: You are a text-to-SQL generator. Given a database schema and a question, reply with a single valid SQLite query that answers it. Output only the SQL on one line, with no explanation and no markdown.

user: Schema:
PRAGMA foreign_keys = ON;


CREATE TABLE "member" (
    "Member_ID" text,
    "Name" text,
    "Nationality" text,
    "Role" text,
    PRIMARY KEY ("Member_ID")
);

Question: What are the dates and locations of performances?

assistant: SELECT Date , LOCATION FROM performance
system: You are a text-to-SQL generator. Given a database schema and a question, reply with a single valid SQLite query that answers it. Output only the SQL on one line, with no explanation and no markdown.

user: Schema:
CREATE TABLE location (
  LocationID integer PRIMARY KEY,
  Country text,
  State text,
  StateCode text,
  City text
);
CREATE TABLE user (
  UserID text PRIMARY KEY,
  Gender text
);
CREATE TABLE twitter (
  TweetID text PRIMARY KEY,
  Weekday text,
  Hour integer,
  Day integer,
  Lang text,
  IsReshare text,
  Reach integer,
  RetweetCount integer,
  Likes integer,
  Klout integer,
  Sentiment real,
  text text,
  LocationID integer,
  UserID text
);
-- foreign keys: twitter.UserID -> user.UserID; twitter.LocationID -> location.LocationID

Hint: "Wednesday" is the Weekday

Question: How many tweets have been posted on Wednesday?

assistant: SELECT COUNT(TweetID) FROM twitter WHERE Weekday = 'Wednesday'
system: You are a text-to-SQL generator. Given a database schema and a question, reply with a single valid SQLite query that answers it. Output only the SQL on one line, with no explanation and no markdown.

user: Schema:
CREATE TABLE characters (
  movie_title text PRIMARY KEY,
  release_date text,
  hero text,
  villian text,
  song text
);
CREATE TABLE director (
  name text PRIMARY KEY,
  director text
);
CREATE TABLE movies_total_gross (
  movie_title text PRIMARY KEY,
  release_date text PRIMARY KEY,
  genre text,
  MPAA_rating text,
  total_gross text,
  inflation_adjusted_gross text
);
CREATE TABLE revenue (
  Year integer PRIMARY KEY,
  Studio Entertainment[NI 1] real,
  Disney Consumer Products[NI 2] real,
  Disney Interactive[NI 3][Rev 1] integer,
  Walt Disney Parks and Resorts real,
  Disney Media Networks text,
  Total integer
);
CREATE TABLE voice-actors (
  character text PRIMARY KEY,
  voice-actor text,
  movie text
);
-- foreign keys: characters.hero -> voice-actors.character; director.name -> characters.movie_title; movies_total_gross.movie_title -> characters.movie_title; voice-actors.movie -> characters.movie_title

Hint: DIVIDE(COUNT(director where total_gross > 100000000), COUNT(director)) as percentage;

Question: Calculate the percentage of directors whose films grossed over $100 million.

assistant: SELECT CAST(COUNT(DISTINCT CASE WHEN CAST(REPLACE(trim(T1.total_gross, '$'), ',', '') AS REAL) > 100000000 THEN T3.director ELSE NULL END) AS REAL) * 100 / COUNT(DISTINCT T3.director) FROM movies_total_gross AS T1 INNER JOIN characters AS T2 ON T1.movie_title = T2.movie_title INNER JOIN director AS T3 ON T1.movie_title = T3.name
system: You are a text-to-SQL generator. Given a database schema and a question, reply with a single valid SQLite query that answers it. Output only the SQL on one line, with no explanation and no markdown.

user: Schema:
CREATE TABLE bank (
branch_ID int PRIMARY KEY,
bname varchar(20),
no_of_customers int,
city varchar(10),
state varchar(20));


CREATE TABLE customer (
cust_ID varchar(3) PRIMARY KEY,
cust_name varchar(20),
acc_type char(1),
acc_bal int,
no_of_loans int,
credit_score int,
branch_ID int,
state varchar(20),
FOREIGN KEY(branch_ID) REFERENCES bank(branch_ID));


CREATE TABLE loan (
loan_ID varchar(3) PRIMARY KEY,
loan_type varchar(15),
cust_ID varchar(3),
branch_ID varchar(3),
amount int,
FOREIGN KEY(branch_ID) REFERENCES bank(branch_ID),
FOREIGN KEY(Cust_ID) REFERENCES customer(Cust_ID));

Question: Find the name of customers who do not have an saving account.

assistant: SELECT cust_name FROM customer EXCEPT SELECT cust_name FROM customer WHERE acc_type = 'saving'
system: You are a text-to-SQL generator. Given a database schema and a question, reply with a single valid SQLite query that answers it. Output only the SQL on one line, with no explanation and no markdown.

user: Schema:
CREATE TABLE chapters (
  id integer PRIMARY KEY,
  Act integer,
  Scene integer,
  Description text,
  work_id integer
);
CREATE TABLE characters (
  id integer PRIMARY KEY,
  CharName text,
  Abbrev text,
  Description text
);
CREATE TABLE paragraphs (
  id integer PRIMARY KEY,
  ParagraphNum integer,
  PlainText text,
  character_id integer,
  chapter_id integer
);
CREATE TABLE works (
  id integer PRIMARY KEY,
  Title text,
  LongTitle text,
  Date integer,
  GenreType text
);

Hint: paragraph No.640171 refers to paragraphs.id = '640171'

Question: What is the description for the character mentioned in paragraph No.640171?

assistant: SELECT T1.Description FROM characters AS T1 INNER JOIN paragraphs AS T2 ON T1.id = T2.character_id WHERE T2.id = '640171'
system: You are a text-to-SQL generator. Given a database schema and a question, reply with a single valid SQLite query that answers it. Output only the SQL on one line, with no explanation and no markdown.

user: Schema:
PRAGMA foreign_keys = ON;

CREATE TABLE "gymnast" (
"Gymnast_ID" int,
"Floor_Exercise_Points" real,
"Pommel_Horse_Points" real,
"Rings_Points" real,
"Vault_Points" real,
"Parallel_Bars_Points" real,
"Horizontal_Bar_Points" real,
"Total_Points" real,
PRIMARY KEY ("Gymnast_ID"),
FOREIGN KEY ("Gymnast_ID") REFERENCES "people"("People_ID")
);

CREATE TABLE "people" (
"People_ID" int,
"Name" text,
"Age" real,
"Height" real,
"Hometown" text,
PRIMARY KEY ("People_ID")
);

Question: Count the number of gymnasts.

assistant: SELECT count(*) FROM gymnast
system: You are a text-to-SQL generator. Given a database schema and a question, reply with a single valid SQLite query that answers it. Output only the SQL on one line, with no explanation and no markdown.

user: Schema:
PRAGMA foreign_keys = ON;
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
);
CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
);
CREATE TABLE `Ref_Product_Categories` (
`product_category_code` VARCHAR(15) PRIMARY KEY,
`product_category_description` VARCHAR(80),
`unit_of_measure` VARCHAR(20)
);

Question: Return the category code and typical price of 'cumin'.

assistant: SELECT product_category_code , typical_buying_price FROM products WHERE product_name = "cumin"