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 Attributes (
  attribute_id integer PRIMARY KEY,
  attribute_name text
);
CREATE TABLE Categories (
  category_id integer PRIMARY KEY,
  category_name text
);
CREATE TABLE Compliments (
  compliment_id integer PRIMARY KEY,
  compliment_type text
);
CREATE TABLE Days (
  day_id integer PRIMARY KEY,
  day_of_week text
);
CREATE TABLE Years (
  year_id integer PRIMARY KEY,
  actual_year integer
);
CREATE TABLE Business_Attributes (
  attribute_id integer PRIMARY KEY,
  business_id integer PRIMARY KEY,
  attribute_value text
);
CREATE TABLE Business_Categories (
  business_id integer PRIMARY KEY,
  category_id integer PRIMARY KEY
);
CREATE TABLE Business_Hours (
  business_id integer PRIMARY KEY,
  day_id integer PRIMARY KEY,
  opening_time text,
  closing_time text
);
CREATE TABLE Checkins (
  business_id integer PRIMARY KEY,
  day_id integer PRIMARY KEY,
  label_time_0 text,
  label_time_1 text,
  label_time_2 text,
  label_time_3 text,
  label_time_4 text,
  label_time_5 text,
  label_time_6 text,
  label_time_7 text,
  label_time_8 text,
  label_time_9 text,
  label_time_10 text,
  label_time_11 text,
  label_time_12 text,
  label_time_13 text,
  label_time_14 text,
  label_time_15 text,
  label_time_16 text,
  label_time_17 text,
  label_time_18 text,
  label_time_19 text,
  label_time_20 text,
  label_time_21 text,
  label_time_22 text,
  label_time_23 text
);
CREATE TABLE Elite (
  user_id integer PRIMARY KEY,
  year_id integer PRIMARY KEY
);
CREATE TABLE Reviews (
  business_id integer PRIMARY KEY,
  user_id integer PRIMARY KEY,
  review_stars integer,
  review_votes_funny text,
  review_votes_useful text,
  review_votes_cool text,
  review_length text
);
CREATE TABLE Tips (
  business_id integer PRIMARY KEY,
  user_id integer PRIMARY KEY,
  likes integer,
  tip_length text
);
CREATE TABLE Users_Compliments (
  compliment_id integer PRIMARY KEY,
  user_id integer PRIMARY KEY,
  number_of_compliments text
);
CREATE TABLE Business (
  business_id integer PRIMARY KEY,
  active text,
  city text,
  state text,
  stars real,
  review_count text
);
CREATE TABLE Users (
  user_id integer PRIMARY KEY,
  user_yelping_since_year integer,
  user_average_stars text,
  user_votes_funny text,
  user_votes_useful text,
  user_votes_cool text,
  user_review_count text,
  user_fans text
);

Hint: in Anthem refers to city = 'Anthem'; stars on average = avg(review_stars)

Question: How many stars on average does a Yelp_Business in Anthem get from a user review?

assistant: SELECT AVG(T2.review_stars) FROM Business AS T1 INNER JOIN Reviews AS T2 ON T1.business_id = T2.business_id WHERE T1.city LIKE 'Anthem'
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 "swimmer" (
"ID" int,
"name" text,
"Nationality" text,
"meter_100" real,
"meter_200" text,
"meter_300" text,
"meter_400" text,
"meter_500" text,
"meter_600" text,
"meter_700" text,
"Time" text,
PRIMARY KEY ("ID")
);

Question: How many events are there?

assistant: SELECT count(*) FROM event
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:
/* 
 * SQL scripts for CS61 Intro to SQL lectures
 * FILENAME SOCCER2.SQL
 */

DROP TABLE  IF EXISTS Player;
DROP TABLE  IF EXISTS Tryout;
DROP TABLE  IF EXISTS College;

CREATE TABLE 	College 
  ( cName   	varchar(20) NOT NULL,
    state   	varchar(2),
    enr     	numeric(5,0),
    PRIMARY KEY (cName)
  );

CREATE TABLE 	Player
  ( pID			numeric(5,0) NOT NULL,
  	pName   	varchar(20),
    yCard   	varchar(3),
    HS      	numeric(5,0),
    PRIMARY KEY (pID)
  );

CREATE TABLE 	Tryout
  ( pID			numeric(5,0),
  	cName   	varchar(20),
    pPos    	varchar(8),
    decision    varchar(3),
    PRIMARY KEY (pID, cName),
    FOREIGN KEY (pID) REFERENCES Player(pID),
    FOREIGN KEY (cName) REFERENCES College(cName)
  );

/* note that "left" and "right" are reserved words in SQL */

Question: What is the number of states that has some colleges whose enrollment is smaller than the average enrollment?

assistant: SELECT count(DISTINCT state) FROM college WHERE enr < (SELECT avg(enr) FROM college)
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 `Document_Types` (
`document_type_code` VARCHAR(10) PRIMARY KEY,
`document_description` VARCHAR(255) NOT NULL
);
CREATE TABLE `Documents` (
`document_id` INTEGER PRIMARY KEY,
`document_type_code` VARCHAR(10),
`grant_id` INTEGER NOT NULL,
`sent_date` DATETIME NOT NULL,
`response_received_date` DATETIME NOT NULL,
`other_details` VARCHAR(255) NOT NULL,
FOREIGN KEY (`document_type_code` ) REFERENCES `Document_Types`(`document_type_code` ),
FOREIGN KEY (`grant_id` ) REFERENCES `Grants`(`grant_id` )
);
CREATE TABLE `Grants` (
`grant_id` INTEGER PRIMARY KEY,
`organisation_id` INTEGER NOT NULL,
`grant_amount` DECIMAL(19,4) NOT NULL DEFAULT 0,
`grant_start_date` DATETIME NOT NULL,
`grant_end_date` DATETIME NOT NULL,
`other_details` VARCHAR(255) NOT NULL,
FOREIGN KEY (`organisation_id` ) REFERENCES `Organisations`(`organisation_id` )
);
CREATE TABLE `Organisation_Types` (
`organisation_type` VARCHAR(10) PRIMARY KEY,
`organisation_type_description` VARCHAR(255) NOT NULL
);
CREATE TABLE `Organisations` (
`organisation_id` INTEGER PRIMARY KEY,
`organisation_type` VARCHAR(10) NOT NULL,
`organisation_details` VARCHAR(255) NOT NULL,
FOREIGN KEY (`organisation_type` ) REFERENCES `Organisation_Types`(`organisation_type` )
);
CREATE TABLE `Project_Outcomes` (
`project_id` INTEGER NOT NULL,
`outcome_code` VARCHAR(10) NOT NULL,
`outcome_details` VARCHAR(255),
FOREIGN KEY (`project_id` ) REFERENCES `Projects`(`project_id` ),FOREIGN KEY (`outcome_code` ) REFERENCES `Research_Outcomes`(`outcome_code` )
);
CREATE TABLE `Project_Staff` (
`staff_id` DOUBLE PRIMARY KEY,
`project_id` INTEGER NOT NULL,
`role_code` VARCHAR(10) NOT NULL,
`date_from` DATETIME,
`date_to` DATETIME,
`other_details` VARCHAR(255),
FOREIGN KEY (`project_id` ) REFERENCES `Projects`(`project_id` ),FOREIGN KEY (`role_code` ) REFERENCES `Staff_Roles`(`role_code` )
);
CREATE TABLE `Projects` (
`project_id` INTEGER PRIMARY KEY,
`organisation_id` INTEGER NOT NULL,
`project_details` VARCHAR(255) NOT NULL,
FOREIGN KEY (`organisation_id` ) REFERENCES `Organisations`(`organisation_id` )
);
CREATE TABLE `Research_Outcomes` (
`outcome_code` VARCHAR(10) PRIMARY KEY,
`outcome_description` VARCHAR(255) NOT NULL
);
CREATE TABLE `Research_Staff` (
`staff_id` INTEGER PRIMARY KEY,
`employer_organisation_id` INTEGER NOT NULL,
`staff_details` VARCHAR(255) NOT NULL,
FOREIGN KEY (`employer_organisation_id` ) REFERENCES `Organisations`(`organisation_id` )
);
CREATE TABLE `Staff_Roles` (
`role_code` VARCHAR(10) PRIMARY KEY,
`role_description` VARCHAR(255) NOT NULL
);
CREATE TABLE `Tasks` (
`task_id` INTEGER PRIMARY KEY,
`project_id` INTEGER NOT NULL,
`task_details` VARCHAR(255) NOT NULL,
`eg Agree Objectives` VARCHAR(1),
FOREIGN KEY (`project_id` ) REFERENCES `Projects`(`project_id` )
);

Question: What are the staff roles of the staff who

assistant: SELECT role_code FROM Project_Staff WHERE date_from > '2003-04-19 15:06:20' AND date_to < '2016-03-15 00:33:18'
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 playstore (
  App text,
  Category text,
  Rating real,
  Reviews integer,
  Size text,
  Installs text,
  Type text,
  Price text,
  Content Rating text,
  Genres text
);
CREATE TABLE user_reviews (
  App text,
  Translated_Review text,
  Sentiment text,
  Sentiment_Polarity text,
  Sentiment_Subjectivity text
);
-- foreign keys: user_reviews.App -> playstore.App

Hint: Draw A Stickman refers to App = 'Draw A Stickman';

Question: What is the rating for "Draw A Stickman"?

assistant: SELECT Rating FROM playstore WHERE APP = 'Draw A Stickman'
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 date of ceremony of music festivals with category "Best Song" and result "Awarded"?

assistant: SELECT Date_of_ceremony FROM music_festival WHERE Category = "Best Song" AND RESULT = "Awarded"
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 "product" (
"product_id" int,
"product" text,
"dimensions" text,
"dpi" real,
"pages_per_minute_color" real,
"max_page_size" text,
"interface" text,
PRIMARY KEY ("product_id")
);

CREATE TABLE "store" (
"Store_ID" int,
"Store_Name" text,
"Type" text,
"Area_size" real,
"Number_of_product_category" real,
"Ranking" int,
PRIMARY KEY ("Store_ID")
);

CREATE TABLE "district" (
"District_ID" int,
"District_name" text,
"Headquartered_City" text,
"City_Population" real,
"City_Area" real,
PRIMARY KEY ("District_ID")
);

Question: Find all the distinct district names ordered by city area in descending.

assistant: SELECT DISTINCT District_name FROM district ORDER BY city_area DESC
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 "product" (
"product_id" int,
"product" text,
"dimensions" text,
"dpi" real,
"pages_per_minute_color" real,
"max_page_size" text,
"interface" text,
PRIMARY KEY ("product_id")
);

CREATE TABLE "store" (
"Store_ID" int,
"Store_Name" text,
"Type" text,
"Area_size" real,
"Number_of_product_category" real,
"Ranking" int,
PRIMARY KEY ("Store_ID")
);

CREATE TABLE "district" (
"District_ID" int,
"District_name" text,
"Headquartered_City" text,
"City_Population" real,
"City_Area" real,
PRIMARY KEY ("District_ID")
);

Question: What are the products with the maximum page size A4 that also have a pages per minute color smaller than 5?

assistant: SELECT product FROM product WHERE max_page_size = "A4" AND pages_per_minute_color < 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 "county" (
"County_Id" int,
"County_name" text,
"Population" real,
"Zip_code" text,
PRIMARY KEY ("County_Id")
);

Question: What are the names of the county that the delegates on "Appropriations" committee belong to?

assistant: SELECT T1.County_name FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District WHERE T2.Committee = "Appropriations"
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 country (
  country_id integer PRIMARY KEY,
  country_iso_code text,
  country_name text
);
CREATE TABLE department (
  department_id integer PRIMARY KEY,
  department_name text
);
CREATE TABLE gender (
  gender_id integer PRIMARY KEY,
  gender text
);
CREATE TABLE genre (
  genre_id integer PRIMARY KEY,
  genre_name text
);
CREATE TABLE keyword (
  keyword_id integer PRIMARY KEY,
  keyword_name text
);
CREATE TABLE language (
  language_id integer PRIMARY KEY,
  language_code text,
  language_name text
);
CREATE TABLE language_role (
  role_id integer PRIMARY KEY,
  language_role text
);
CREATE TABLE movie (
  movie_id integer PRIMARY KEY,
  title text,
  budget integer,
  homepage text,
  overview text,
  popularity real,
  release_date date,
  revenue integer,
  runtime integer,
  movie_status text,
  tagline text,
  vote_average real,
  vote_count integer
);
CREATE TABLE movie_genres (
  movie_id integer,
  genre_id integer
);
CREATE TABLE movie_languages (
  movie_id integer,
  language_id integer,
  language_role_id integer
);
CREATE TABLE person (
  person_id integer PRIMARY KEY,
  person_name text
);
CREATE TABLE movie_crew (
  movie_id integer,
  person_id integer,
  department_id integer,
  job text
);
CREATE TABLE production_company (
  company_id integer PRIMARY KEY,
  company_name text
);
CREATE TABLE production_country (
  movie_id integer,
  country_id integer
);
CREATE TABLE movie_cast (
  movie_id integer,
  person_id integer,
  character_name text,
  gender_id integer,
  cast_order integer
);
CREATE TABLE movie_keywords (
  movie_id integer,
  keyword_id integer
);
CREATE TABLE movie_company (
  movie_id integer,
  company_id integer
);
-- foreign keys: movie_genres.movie_id -> movie.movie_id; movie_genres.genre_id -> genre.genre_id; movie_languages.language_role_id -> language_role.role_id; movie_languages.movie_id -> movie.movie_id; movie_languages.language_id -> language.language_id; movie_crew.person_id -> person.person_id; movie_crew.movie_id -> movie.movie_id; movie_crew.department_id -> department.department_id; production_country.movie_id -> movie.movie_id; production_country.country_id -> country.country_id; movie_cast.person_id -> person.person_id; movie_cast.movie_id -> movie.movie_id; movie_cast.gender_id -> gender.gender_id

Question: How many movies did Harrison Ford appear in total?

assistant: SELECT COUNT(T2.movie_id) FROM person AS T1 INNER JOIN movie_cast AS T2 ON T1.person_id = T2.person_id WHERE T1.person_name = 'Harrison Ford'
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: What is the average price of wines produced in appelations in Sonoma County?

assistant: SELECT AVG(T2.Price) FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.County = "Sonoma"
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 bool (
  name text PRIMARY KEY
);
CREATE TABLE person (
  name text PRIMARY KEY
);
CREATE TABLE disabled (
  name text PRIMARY KEY
);
CREATE TABLE enlist (
  name text,
  organ text
);
CREATE TABLE filed_for_bankrupcy (
  name text PRIMARY KEY
);
CREATE TABLE longest_absense_from_school (
  name text PRIMARY KEY,
  month integer
);
CREATE TABLE male (
  name text PRIMARY KEY
);
CREATE TABLE no_payment_due (
  name text PRIMARY KEY,
  bool text
);
CREATE TABLE unemployed (
  name text PRIMARY KEY
);
CREATE TABLE enrolled (
  name text PRIMARY KEY,
  school text PRIMARY KEY,
  month integer
);
-- foreign keys: disabled.name -> person.name; enlist.name -> person.name; filed_for_bankrupcy.name -> person.name; longest_absense_from_school.name -> person.name; male.name -> person.name; no_payment_due.bool -> bool.name; no_payment_due.name -> person.name; unemployed.name -> person.name; enrolled.name -> person.name

Hint: average = DIVIDE(FLOOR(COUNT(NAME), COUNT(DISTINCT organ)));

Question: Calculate the average enlisted students per organization.

assistant: SELECT CAST(COUNT(NAME) AS REAL) * 100 / COUNT(DISTINCT organ) FROM enlist
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,
`line_1_number_building` VARCHAR(80),
`town_city` VARCHAR(50),
`zip_postcode` VARCHAR(20),
`state_province_county` VARCHAR(50),
`country` VARCHAR(50)
);

Question: What are the last names of individuals who have been contact individuals for an organization?

assistant: SELECT DISTINCT t1.individual_last_name FROM individuals AS t1 JOIN organization_contact_individuals AS t2 ON t1.individual_id = t2.individual_id
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: Give the id and product type of the product with the lowest price.

assistant: SELECT product_id , product_type_code FROM products ORDER BY product_price 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 Customers (
Customer_ID INTEGER NOT NULL,
Customer_Details VARCHAR(255) NOT NULL,
PRIMARY KEY (Customer_ID)
);

Question: Find the settlement amount of the claim with the largest claim amount. Show both the settlement amount and claim amount.

assistant: SELECT Amount_Settled , Amount_Claimed FROM Claims ORDER BY Amount_Claimed 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 "entrepreneur" (
"Entrepreneur_ID" int,
"People_ID" int,
"Company" text,
"Money_Requested" real,
"Investor" text,
PRIMARY KEY ("Entrepreneur_ID"),
FOREIGN KEY ("People_ID") REFERENCES "people"("People_ID")
);

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

Question: What are the companies of entrepreneurs, ordered descending by amount of money requested?

assistant: SELECT Company FROM entrepreneur ORDER BY Money_Requested DESC
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 "medicine" (
"id" int,
"name" text,
"Trade_Name" text,
"FDA_approved" text,
primary key ("id")
);

CREATE TABLE "enzyme" (
"id" int,
"name" text,
"Location" text,
"Product" text,
"Chromosome" text,
"OMIM" int,
"Porphyria" text,
primary key ("id")
);


CREATE TABLE "medicine_enzyme_interaction" (
"enzyme_id" int,
"medicine_id" int,
"interaction_type" text,
primary key ("enzyme_id", "medicine_id"),
foreign key ("enzyme_id") references `enzyme`("id"),
foreign key ("medicine_id") references `medicine`("id")
);

Question: What are the names of enzymes in descending order?

assistant: SELECT name FROM enzyme ORDER BY name DESC
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 "country" (
    "Country_id" int,
    "Country_name" text,
    "Capital" text,
    "Official_native_language" text,
    PRIMARY KEY ("Country_id")
);


CREATE TABLE `team` (
      `Team_id` int,
      `Name` text,
      PRIMARY KEY (`Team_id`)
) ;

Question: How many distinct colleges are associated with players from the team with name "Columbus Crew".

assistant: SELECT count(DISTINCT T1.College) FROM match_season AS T1 JOIN team AS T2 ON T1.Team = T2.Team_id WHERE T2.Name = "Columbus Crew"
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 bool (
  name text PRIMARY KEY
);
CREATE TABLE person (
  name text PRIMARY KEY
);
CREATE TABLE disabled (
  name text PRIMARY KEY
);
CREATE TABLE enlist (
  name text,
  organ text
);
CREATE TABLE filed_for_bankrupcy (
  name text PRIMARY KEY
);
CREATE TABLE longest_absense_from_school (
  name text PRIMARY KEY,
  month integer
);
CREATE TABLE male (
  name text PRIMARY KEY
);
CREATE TABLE no_payment_due (
  name text PRIMARY KEY,
  bool text
);
CREATE TABLE unemployed (
  name text PRIMARY KEY
);
CREATE TABLE enrolled (
  name text PRIMARY KEY,
  school text PRIMARY KEY,
  month integer
);
-- foreign keys: disabled.name -> person.name; enlist.name -> person.name; filed_for_bankrupcy.name -> person.name; longest_absense_from_school.name -> person.name; male.name -> person.name; no_payment_due.bool -> bool.name; no_payment_due.name -> person.name; unemployed.name -> person.name; enrolled.name -> person.name

Hint: enlisted in marines refers to organ = 'marines';

Question: State the unemployed students who enlisted in marines.

assistant: SELECT T1.name FROM unemployed AS T1 INNER JOIN enlist AS T2 ON T1.name = T2.name WHERE T2.organ = 'marines'