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 Air Carriers (
  Code integer PRIMARY KEY,
  Description text
);
CREATE TABLE Airports (
  Code text PRIMARY KEY,
  Description text
);
CREATE TABLE Airlines (
  FL_DATE text,
  OP_CARRIER_AIRLINE_ID integer,
  TAIL_NUM text,
  OP_CARRIER_FL_NUM integer,
  ORIGIN_AIRPORT_ID integer,
  ORIGIN_AIRPORT_SEQ_ID integer,
  ORIGIN_CITY_MARKET_ID integer,
  ORIGIN text,
  DEST_AIRPORT_ID integer,
  DEST_AIRPORT_SEQ_ID integer,
  DEST_CITY_MARKET_ID integer,
  DEST text,
  CRS_DEP_TIME integer,
  DEP_TIME integer,
  DEP_DELAY integer,
  DEP_DELAY_NEW integer,
  ARR_TIME integer,
  ARR_DELAY integer,
  ARR_DELAY_NEW integer,
  CANCELLED integer,
  CANCELLATION_CODE text,
  CRS_ELAPSED_TIME integer,
  ACTUAL_ELAPSED_TIME integer,
  CARRIER_DELAY integer,
  WEATHER_DELAY integer,
  NAS_DELAY integer,
  SECURITY_DELAY integer,
  LATE_AIRCRAFT_DELAY integer
);
-- foreign keys: Airlines.OP_CARRIER_AIRLINE_ID -> Air Carriers.Code; Airlines.DEST -> Airports.Code; Airlines.ORIGIN -> Airports.Code

Hint: cancelled flights refers to CANCELLED = 1;

Question: How many cancelled flights are there?

assistant: SELECT COUNT(*) FROM Airlines WHERE CANCELLED = 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:
CREATE TABLE Author (
  Id integer PRIMARY KEY,
  Name text,
  Affiliation text
);
CREATE TABLE Conference (
  Id integer PRIMARY KEY,
  ShortName text,
  FullName text,
  HomePage text
);
CREATE TABLE Journal (
  Id integer PRIMARY KEY,
  ShortName text,
  FullName text,
  HomePage text
);
CREATE TABLE Paper (
  Id integer PRIMARY KEY,
  Title text,
  Year integer,
  ConferenceId integer,
  JournalId integer,
  Keyword text
);
CREATE TABLE PaperAuthor (
  PaperId integer,
  AuthorId integer,
  Name text,
  Affiliation text
);
-- foreign keys: Paper.JournalId -> Journal.Id; Paper.ConferenceId -> Conference.Id; PaperAuthor.AuthorId -> Author.Id; PaperAuthor.PaperId -> Paper.Id

Hint: "Cairo Microsoft Innovation Lab" is the Affiliation organization

Question: Enumerate the paper and author ID of authors with affiliation with Cairo Microsoft Innovation Lab.

assistant: SELECT PaperId, AuthorId FROM PaperAuthor WHERE Affiliation LIKE 'Cairo Microsoft Innovation Lab%'
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 course (
  course_id integer PRIMARY KEY,
  name text,
  credit integer,
  diff integer
);
CREATE TABLE prof (
  prof_id integer PRIMARY KEY,
  gender text,
  first_name text,
  last_name text,
  email text,
  popularity integer,
  teachingability integer,
  graduate_from text
);
CREATE TABLE RA (
  student_id integer PRIMARY KEY,
  capability integer,
  prof_id integer PRIMARY KEY,
  salary text
);
CREATE TABLE registration (
  course_id integer PRIMARY KEY,
  student_id integer PRIMARY KEY,
  grade text,
  sat integer
);
CREATE TABLE student (
  student_id integer PRIMARY KEY,
  f_name text,
  l_name text,
  phone_number text,
  email text,
  intelligence integer,
  gpa real,
  type text
);
-- foreign keys: RA.student_id -> student.student_id; RA.prof_id -> prof.prof_id; registration.student_id -> student.student_id; registration.course_id -> course.course_id

Hint: more than average teaching ability refers to teachingability > AVG(teachingability); full_name of the professor = first_name, last_name; email address of the professor refers to email; advises two or more students refers to COUNT(student_id) > = 2;

Question: Among the professors with more than average teaching ability, list the full name and email address of the professors who advise two or more students.

assistant: SELECT T2.first_name, T2.last_name, T2.email FROM RA AS T1 INNER JOIN prof AS T2 ON T1.prof_id = T2.prof_id WHERE T2.teachingability > ( SELECT AVG(teachingability) FROM prof ) GROUP BY T2.prof_id HAVING COUNT(T1.student_id) >= 2
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 torrents (
  groupName text,
  totalSnatched integer,
  artist text,
  groupYear integer,
  releaseType text,
  groupId integer,
  id integer PRIMARY KEY
);
CREATE TABLE tags (
  index integer PRIMARY KEY,
  id integer,
  tag text
);

Hint: tag = '1980s';

Question: How many releases are tagged "1980s"?

assistant: SELECT COUNT(id) FROM tags WHERE tag LIKE '1980s'
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 Customers (
  CustomerID integer PRIMARY KEY,
  FirstName text,
  MiddleInitial text,
  LastName text
);
CREATE TABLE Employees (
  EmployeeID integer PRIMARY KEY,
  FirstName text,
  MiddleInitial text,
  LastName text
);
CREATE TABLE Products (
  ProductID integer PRIMARY KEY,
  Name text,
  Price real
);
CREATE TABLE Sales (
  SalesID integer PRIMARY KEY,
  SalesPersonID integer,
  CustomerID integer,
  ProductID integer,
  Quantity integer
);
-- foreign keys: Sales.ProductID -> Products.ProductID; Sales.CustomerID -> Customers.CustomerID; Sales.SalesPersonID -> Employees.EmployeeID

Hint: total price = SUM(MULTIPLY(Price, Quantity)); from id 400 to 500 refers to ProductID BETWEEN 400 AND 500;

Question: Calculate the total price for products from id 400 to 500.

assistant: SELECT SUM(T1.Price * T2.quantity) FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID WHERE T1.ProductID BETWEEN 400 AND 500
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 Person (
  name varchar(20) PRIMARY KEY,
  age INTEGER,
  city TEXT,
  gender TEXT,
  job TEXT
);

CREATE TABLE PersonFriend (
  name varchar(20),
  friend varchar(20),
  year INTEGER,
  FOREIGN KEY (name) REFERENCES Person(name),
  FOREIGN KEY (friend) REFERENCES Person(name)
);

Question: Find the name of the person who has friends with age above 40 but not under age 30?

assistant: SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend IN (SELECT name FROM Person WHERE age > 40) EXCEPT SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend IN (SELECT name FROM Person WHERE age < 30)
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 "film" (
"Film_ID" int,
"Title" text,
"Studio" text,
"Director" text,
"Gross_in_dollar" int,
PRIMARY KEY ("Film_ID")
);

Question: List the name of film studio that have the most number of films.

assistant: SELECT Studio FROM film GROUP BY Studio ORDER BY COUNT(*) 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:
CREATE TABLE film_text (
  film_id integer PRIMARY KEY,
  title text,
  description text
);
CREATE TABLE actor (
  actor_id integer PRIMARY KEY,
  first_name text,
  last_name text,
  last_update datetime
);
CREATE TABLE address (
  address_id integer PRIMARY KEY,
  address text,
  address2 text,
  district text,
  city_id integer,
  postal_code text,
  phone text,
  last_update datetime
);
CREATE TABLE category (
  category_id integer PRIMARY KEY,
  name text,
  last_update datetime
);
CREATE TABLE city (
  city_id integer PRIMARY KEY,
  city text,
  country_id integer,
  last_update datetime
);
CREATE TABLE country (
  country_id integer PRIMARY KEY,
  country text,
  last_update datetime
);
CREATE TABLE customer (
  customer_id integer PRIMARY KEY,
  store_id integer,
  first_name text,
  last_name text,
  email text,
  address_id integer,
  active integer,
  create_date datetime,
  last_update datetime
);
CREATE TABLE film (
  film_id integer PRIMARY KEY,
  title text,
  description text,
  release_year text,
  language_id integer,
  original_language_id integer,
  rental_duration integer,
  rental_rate real,
  length integer,
  replacement_cost real,
  rating text,
  special_features text,
  last_update datetime
);
CREATE TABLE film_actor (
  actor_id integer PRIMARY KEY,
  film_id integer PRIMARY KEY,
  last_update datetime
);
CREATE TABLE film_category (
  film_id integer PRIMARY KEY,
  category_id integer PRIMARY KEY,
  last_update datetime
);
CREATE TABLE inventory (
  inventory_id integer PRIMARY KEY,
  film_id integer,
  store_id integer,
  last_update datetime
);
CREATE TABLE language (
  language_id integer PRIMARY KEY,
  name text,
  last_update datetime
);
CREATE TABLE payment (
  payment_id integer PRIMARY KEY,
  customer_id integer,
  staff_id integer,
  rental_id integer,
  amount real,
  payment_date datetime,
  last_update datetime
);
CREATE TABLE rental (
  rental_id integer PRIMARY KEY,
  rental_date datetime,
  inventory_id integer,
  customer_id integer,
  return_date datetime,
  staff_id integer,
  last_update datetime
);
CREATE TABLE staff (
  staff_id integer PRIMARY KEY,
  first_name text,
  last_name text,
  address_id integer,
  picture blob,
  email text,
  store_id integer,
  active integer,
  username text,
  password text,
  last_update datetime
);
CREATE TABLE store (
  store_id integer PRIMARY KEY,
  manager_staff_id integer,
  address_id integer,
  last_update datetime
);

Hint: average rental rate of all listed films refers to AVG(rental_rate); rental rate greater than the 60% of average rental rate refers to rental_rate > (AVG(rental_rate)) MULTIPLY 0.6

Question: List the store ID of the films with a rental rate greater than the 60% of average rental rate of all listed films.

assistant: SELECT T2.store_id FROM film AS T1 INNER JOIN inventory AS T2 ON T1.film_id = T2.film_id WHERE T1.rental_rate > ( SELECT AVG(T1.rental_rate) * 0.6 FROM film AS T1 )
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 Scientists (
  SSN int,
  Name Char(30) not null,
  Primary Key (SSN)
);

Create table Projects (
  Code Char(4),
  Name Char(50) not null,
  Hours int,
  Primary Key (Code)
);
	
create table AssignedTo (
  Scientist int not null,
  Project char(4) not null,
  Primary Key (Scientist, Project),
  Foreign Key (Scientist) references Scientists (SSN),
  Foreign Key (Project) references Projects (Code)
);

Question: What are the names of scientists who have not been assigned a project?

assistant: SELECT Name FROM scientists WHERE ssn NOT IN (SELECT scientist FROM AssignedTo)
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 essays (
  projectid text,
  teacher_acctid text,
  title text,
  short_description text,
  need_statement text,
  essay text
);
CREATE TABLE projects (
  projectid text PRIMARY KEY,
  teacher_acctid text,
  schoolid text,
  school_ncesid text,
  school_latitude real,
  school_longitude real,
  school_city text,
  school_state text,
  school_zip integer,
  school_metro text,
  school_district text,
  school_county text,
  school_charter text,
  school_magnet text,
  school_year_round text,
  school_nlns text,
  school_kipp text,
  school_charter_ready_promise text,
  teacher_prefix text,
  teacher_teach_for_america text,
  teacher_ny_teaching_fellow text,
  primary_focus_subject text,
  primary_focus_area text,
  secondary_focus_subject text,
  secondary_focus_area text,
  resource_type text,
  poverty_level text,
  grade_level text,
  fulfillment_labor_materials real,
  total_price_excluding_optional_support real,
  total_price_including_optional_support real,
  students_reached integer,
  eligible_double_your_impact_match text,
  eligible_almost_home_match text,
  date_posted date
);
CREATE TABLE donations (
  donationid text PRIMARY KEY,
  projectid text,
  donor_acctid text,
  donor_city text,
  donor_state text,
  donor_zip text,
  is_teacher_acct text,
  donation_timestamp datetime,
  donation_to_project real,
  donation_optional_support real,
  donation_total real,
  dollar_amount text,
  donation_included_optional_support text,
  payment_method text,
  payment_included_acct_credit text,
  payment_included_campaign_gift_card text,
  payment_included_web_purchased_gift_card text,
  payment_was_promo_matched text,
  via_giving_page text,
  for_honoree text,
  donation_message text
);
CREATE TABLE resources (
  resourceid text PRIMARY KEY,
  projectid text,
  vendorid integer,
  vendor_name text,
  project_resource_type text,
  item_name text,
  item_number text,
  item_unit_price real,
  item_quantity integer
);
-- foreign keys: donations.projectid -> projects.projectid; resources.projectid -> projects.projectid

Hint: paid via credit card refer to payment method = creditcard; Memphis City School District refer to school_district

Question: How many donations were paid via credit card to Memphis City School District?

assistant: SELECT COUNT(T1.projectid) FROM donations AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid WHERE T1.payment_method = 'creditcard' AND T2.school_district = 'Memphis City School District'
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: Elsa is the main character of the movie which refers to hero = 'Elsa'; voiced by which actor refers to voice-actor;

Question: The main character Elsa is voiced by which actor and who is the director of the movie?

assistant: SELECT T1.`voice-actor`, T3.director FROM `voice-actors` AS T1 INNER JOIN characters AS T2 ON T1.movie = T2.movie_title INNER JOIN director AS T3 ON T2.movie_title = T3.name WHERE T2.hero = 'Elsa'
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 Customers (
  CustomerID integer PRIMARY KEY,
  FirstName text,
  MiddleInitial text,
  LastName text
);
CREATE TABLE Employees (
  EmployeeID integer PRIMARY KEY,
  FirstName text,
  MiddleInitial text,
  LastName text
);
CREATE TABLE Products (
  ProductID integer PRIMARY KEY,
  Name text,
  Price real
);
CREATE TABLE Sales (
  SalesID integer PRIMARY KEY,
  SalesPersonID integer,
  CustomerID integer,
  ProductID integer,
  Quantity integer
);
-- foreign keys: Sales.ProductID -> Products.ProductID; Sales.CustomerID -> Customers.CustomerID; Sales.SalesPersonID -> Employees.EmployeeID

Hint: External Lock Washer 7' is name of product;

Question: List the sales ID of the product with a quantity of 590 and named "External Lock Washer 7".

assistant: SELECT T1.SalesID FROM Sales AS T1 INNER JOIN Products AS T2 ON T1.ProductID = T2.ProductID WHERE T2.Name = 'External Lock Washer 7' AND T1.Quantity = 590
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 address_status (
  status_id integer PRIMARY KEY,
  address_status text
);
CREATE TABLE author (
  author_id integer PRIMARY KEY,
  author_name text
);
CREATE TABLE book_language (
  language_id integer PRIMARY KEY,
  language_code text,
  language_name text
);
CREATE TABLE country (
  country_id integer PRIMARY KEY,
  country_name text
);
CREATE TABLE address (
  address_id integer PRIMARY KEY,
  street_number text,
  street_name text,
  city text,
  country_id integer
);
CREATE TABLE customer (
  customer_id integer PRIMARY KEY,
  first_name text,
  last_name text,
  email text
);
CREATE TABLE customer_address (
  customer_id integer PRIMARY KEY,
  address_id integer PRIMARY KEY,
  status_id integer
);
CREATE TABLE order_status (
  status_id integer PRIMARY KEY,
  status_value text
);
CREATE TABLE publisher (
  publisher_id integer PRIMARY KEY,
  publisher_name text
);
CREATE TABLE book (
  book_id integer PRIMARY KEY,
  title text,
  isbn13 text,
  language_id integer,
  num_pages integer,
  publication_date date,
  publisher_id integer
);
CREATE TABLE book_author (
  book_id integer PRIMARY KEY,
  author_id integer PRIMARY KEY
);
CREATE TABLE shipping_method (
  method_id integer PRIMARY KEY,
  method_name text,
  cost real
);
CREATE TABLE cust_order (
  order_id integer PRIMARY KEY,
  order_date datetime,
  customer_id integer,
  shipping_method_id integer,
  dest_address_id integer
);
CREATE TABLE order_history (
  history_id integer PRIMARY KEY,
  order_id integer,
  status_id integer,
  status_date datetime
);
CREATE TABLE order_line (
  line_id integer PRIMARY KEY,
  order_id integer,
  book_id integer,
  price real
);
-- foreign keys: address.country_id -> country.country_id; customer_address.customer_id -> customer.customer_id; customer_address.address_id -> address.address_id; book.publisher_id -> publisher.publisher_id; book.language_id -> book_language.language_id; book_author.book_id -> book.book_id; book_author.author_id -> author.author_id

Hint: "Priority" and "Express" are both method_name; cost difference = Subtract (Sum(cost where method_name = 'Express'), Sum(cost where method_name 'Priority'))

Question: Identify the cost difference between Priority and Express shipping methods.

assistant: SELECT SUM(CASE WHEN method_name = 'Priority' THEN cost ELSE 0 END) - SUM(CASE WHEN method_name = 'Express' THEN cost ELSE 0 END) FROM shipping_method
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 "grapes" ( 
	"ID" INTEGER PRIMARY KEY, 
	"Grape" TEXT UNIQUE, 
	"Color" TEXT 
);

CREATE TABLE "appellations" ( 
	"No" INTEGER PRIMARY KEY, 
	"Appelation" TEXT UNIQUE, 
	"County" TEXT, 
	"State" TEXT, 
	"Area" TEXT, 
	"isAVA" TEXT
);

CREATE TABLE "wine" ( 
	"No" INTEGER, 
	"Grape" TEXT, 
	"Winery" TEXT, 
	"Appelation" TEXT, 
	"State" TEXT, 
	"Name" TEXT, 
	"Year" INTEGER, 
	"Price" INTEGER, 
	"Score" INTEGER, 
	"Cases" INTEGER, 
	"Drink" TEXT,
	FOREIGN KEY (Grape) REFERENCES grapes(Grape),
	FOREIGN KEY (Appelation) REFERENCES appellations(Appelation)
);

Question: Find the names of all distinct wines that have appellations in North Coast area.

assistant: SELECT DISTINCT T2.Name FROM APPELLATIONs AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.Area = "North Coast"
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: working from Casting Department refers to category = 'Casting Department'

Question: How many title's crew members are working from Casting Department?

assistant: SELECT COUNT(*) FROM Episode AS T1 INNER JOIN Credit AS T2 ON T1.episode_id = T2.episode_id WHERE T2.category = 'Casting Department';
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 "artist" (
    "Artist_ID" int,
    "Artist" text,
    "Age" int,
    "Famous_Title" text,
    "Famous_Release_date" text,
    PRIMARY KEY ("Artist_ID")
);



CREATE TABLE "volume" (
    "Volume_ID" int,
    "Volume_Issue" text,
    "Issue_Date" text,
    "Weeks_on_Top" real,
    "Song" text,
    "Artist_ID" int,
    PRIMARY KEY ("Volume_ID"),
    FOREIGN KEY (`Artist_ID`) REFERENCES `artist`(`Artist_ID`)
);

Question: What are the categories of music festivals for which there have been more than 1 music festival?

assistant: SELECT Category FROM music_festival GROUP BY Category HAVING COUNT(*) > 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:
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: Find the number of students in total.

assistant: SELECT count(*) FROM list