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 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: most expensive book refers to Max(price)

Question: What is the title of the most expensive book?

assistant: SELECT T1.title FROM book AS T1 INNER JOIN order_line AS T2 ON T1.book_id = T2.book_id 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 "city" (
"City_ID" int,
"City" text,
"Hanzi" text,
"Hanyu_Pinyin" text,
"Regional_Population" int,
"GDP" real,
PRIMARY KEY ("City_ID")
);

CREATE TABLE "match" (
"Match_ID" int,
"Date" text,
"Venue" text,
"Score" text,
"Result" text,
"Competition" text,
PRIMARY KEY ("Match_ID")
);



CREATE TABLE "temperature" (
"City_ID" int,
"Jan" real,
"Feb" real,
"Mar" real,
"Apr" real,
"Jun" real,
"Jul" real,
"Aug" real,
"Sep" real,
"Oct" real,
"Nov" real,
"Dec" real,
PRIMARY KEY ("City_ID"),
FOREIGN KEY (`City_ID`) REFERENCES `city`(`City_ID`)
);

Question: List venues of all matches in the order of their dates starting from the most recent one.

assistant: SELECT venue FROM MATCH ORDER BY date 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 `Accounts` (
`account_id` INTEGER PRIMARY KEY,
`customer_id` INTEGER NOT NULL,
`account_name` VARCHAR(50),
`other_account_details` VARCHAR(255)
);
CREATE TABLE `Customers` (
`customer_id` INTEGER PRIMARY KEY,
`customer_first_name` VARCHAR(20),
`customer_last_name` VARCHAR(20),
`customer_address` VARCHAR(255),
`customer_phone` VARCHAR(255),
`customer_email` VARCHAR(255),
`other_customer_details` VARCHAR(255)
);
CREATE TABLE `Customers_Cards` (
`card_id` INTEGER PRIMARY KEY,
`customer_id` INTEGER NOT NULL,
`card_type_code` VARCHAR(15) NOT NULL,
`card_number` VARCHAR(80),
`date_valid_from` DATETIME,
`date_valid_to` DATETIME,
`other_card_details` VARCHAR(255)
);
CREATE TABLE `Financial_Transactions` (
`transaction_id` INTEGER NOT NULL ,
`previous_transaction_id` INTEGER,
`account_id` INTEGER NOT NULL,
`card_id` INTEGER NOT NULL,
`transaction_type` VARCHAR(15) NOT NULL,
`transaction_date` DATETIME,
`transaction_amount` DOUBLE NULL,
`transaction_comment` VARCHAR(255),
`other_transaction_details` VARCHAR(255),
FOREIGN KEY (`card_id` ) REFERENCES `Customers_Cards`(`card_id` ),
FOREIGN KEY (`account_id` ) REFERENCES `Accounts`(`account_id` )
);

Question: What is the customer id with most number of cards, and how many does he have?

assistant: SELECT customer_id , count(*) FROM Customers_cards GROUP BY customer_id 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 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: "Villeneuve-la-Garenne" is the city

Question: How many customers have an address that is located in the city of Villeneuve-la-Garenne?

assistant: SELECT COUNT(address_id) FROM address WHERE city = 'Villeneuve-la-Garenne'
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: Return the result that is most frequent at music festivals.

assistant: SELECT RESULT FROM music_festival GROUP BY RESULT 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 geographic (
  city text PRIMARY KEY,
  county text,
  region text
);
CREATE TABLE generalinfo (
  id_restaurant integer PRIMARY KEY,
  label text,
  food_type text,
  city text,
  review real
);
CREATE TABLE location (
  id_restaurant integer PRIMARY KEY,
  street_num integer,
  street_name text,
  city text
);
-- foreign keys: generalinfo.city -> geographic.city; location.id_restaurant -> generalinfo.id_restaurant; location.city -> geographic.city

Hint: 430 Broadway refers to street_num = 430 and street_name = 'Broadway'

Question: Give the review of the restaurant at 430, Broadway.

assistant: SELECT T1.review FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T2.street_name = 'Broadway' AND T2.street_num = 430
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 station (
  id integer PRIMARY KEY,
  name text,
  lat real,
  long real,
  dock_count integer,
  city text,
  installation_date text
);
CREATE TABLE status (
  station_id integer,
  bikes_available integer,
  docks_available integer,
  time text
);
CREATE TABLE trip (
  id integer PRIMARY KEY,
  duration integer,
  start_date text,
  start_station_name text,
  start_station_id integer,
  end_date text,
  end_station_name text,
  end_station_id integer,
  bike_id integer,
  subscription_type text,
  zip_code integer
);
CREATE TABLE weather (
  date text,
  max_temperature_f integer,
  mean_temperature_f integer,
  min_temperature_f integer,
  max_dew_point_f integer,
  mean_dew_point_f integer,
  min_dew_point_f integer,
  max_humidity integer,
  mean_humidity integer,
  min_humidity integer,
  max_sea_level_pressure_inches real,
  mean_sea_level_pressure_inches real,
  min_sea_level_pressure_inches real,
  max_visibility_miles integer,
  mean_visibility_miles integer,
  min_visibility_miles integer,
  max_wind_Speed_mph integer,
  mean_wind_speed_mph integer,
  max_gust_speed_mph integer,
  precipitation_inches text,
  cloud_cover integer,
  events text,
  wind_dir_degrees integer,
  zip_code text
);

Hint: in 2015 refers to end_date like '%2015%'; percentage = DIVIDE(COUNT(events = 'Rain'), COUNT(events));

Question: In 2015, what percentage of trips that had the subscription type was Customer and ended on a rainy day?

assistant: SELECT CAST(SUM(CASE WHEN T2.events = 'Rain' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.id) FROM trip AS T1 INNER JOIN weather AS T2 ON T2.zip_code = T1.zip_code WHERE SUBSTR(CAST(T2.date AS TEXT), -4) = '2015' AND T1.subscription_type = 'Customer'
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 customer (
  c_custkey integer PRIMARY KEY,
  c_mktsegment text,
  c_nationkey integer,
  c_name text,
  c_address text,
  c_phone text,
  c_acctbal real,
  c_comment text
);
CREATE TABLE lineitem (
  l_shipdate date,
  l_orderkey integer PRIMARY KEY,
  l_discount real,
  l_extendedprice real,
  l_suppkey integer,
  l_quantity integer,
  l_returnflag text,
  l_partkey integer,
  l_linestatus text,
  l_tax real,
  l_commitdate date,
  l_receiptdate date,
  l_shipmode text,
  l_linenumber integer PRIMARY KEY,
  l_shipinstruct text,
  l_comment text
);
CREATE TABLE nation (
  n_nationkey integer PRIMARY KEY,
  n_name text,
  n_regionkey integer,
  n_comment text
);
CREATE TABLE orders (
  o_orderdate date,
  o_orderkey integer PRIMARY KEY,
  o_custkey integer,
  o_orderpriority text,
  o_shippriority integer,
  o_clerk text,
  o_orderstatus text,
  o_totalprice real,
  o_comment text
);
CREATE TABLE part (
  p_partkey integer PRIMARY KEY,
  p_type text,
  p_size integer,
  p_brand text,
  p_name text,
  p_container text,
  p_mfgr text,
  p_retailprice real,
  p_comment text
);
CREATE TABLE partsupp (
  ps_partkey integer PRIMARY KEY,
  ps_suppkey integer PRIMARY KEY,
  ps_supplycost real,
  ps_availqty integer,
  ps_comment text
);
CREATE TABLE region (
  r_regionkey integer PRIMARY KEY,
  r_name text,
  r_comment text
);
CREATE TABLE supplier (
  s_suppkey integer PRIMARY KEY,
  s_nationkey integer,
  s_comment text,
  s_name text,
  s_address text,
  s_phone text,
  s_acctbal real
);
-- foreign keys: customer.c_nationkey -> nation.n_nationkey; lineitem.l_partkey -> partsupp.ps_partkey; lineitem.l_suppkey -> partsupp.ps_suppkey; lineitem.l_orderkey -> orders.o_orderkey; nation.n_regionkey -> region.r_regionkey; orders.o_custkey -> customer.c_custkey; partsupp.ps_suppkey -> supplier.s_suppkey; partsupp.ps_partkey -> part.p_partkey; supplier.s_nationkey -> nation.n_nationkey

Hint: mode of shipping refers to l_shipmode; part "burnished seashell gainsboro navajo chocolate" refers to p_name = 'burnished seashell gainsboro navajo chocolate'

Question: Please list all the modes of shipping for the part "burnished seashell gainsboro navajo chocolate".

assistant: SELECT DISTINCT T1.l_shipmode FROM lineitem AS T1 INNER JOIN part AS T2 ON T1.l_partkey = T2.p_partkey WHERE T2.p_name = 'burnished seashell gainsboro navajo chocolate'
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 "railway" (
"Railway_ID" int,
"Railway" text,
"Builder" text,
"Built" text,
"Wheels" text,
"Location" text,
"ObjectNumber" text,
PRIMARY KEY ("Railway_ID")
);

Question: What is the name of the oldest manager?

assistant: SELECT Name FROM manager ORDER BY Age 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 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: release "sugarhill gang" refers to groupName = 'sugarhill gang';

Question: What are the tags of the release "sugarhill gang"?

assistant: SELECT T2.tag FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T1.groupName = 'sugarhill gang'
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 customer (
  c_custkey integer PRIMARY KEY,
  c_mktsegment text,
  c_nationkey integer,
  c_name text,
  c_address text,
  c_phone text,
  c_acctbal real,
  c_comment text
);
CREATE TABLE lineitem (
  l_shipdate date,
  l_orderkey integer PRIMARY KEY,
  l_discount real,
  l_extendedprice real,
  l_suppkey integer,
  l_quantity integer,
  l_returnflag text,
  l_partkey integer,
  l_linestatus text,
  l_tax real,
  l_commitdate date,
  l_receiptdate date,
  l_shipmode text,
  l_linenumber integer PRIMARY KEY,
  l_shipinstruct text,
  l_comment text
);
CREATE TABLE nation (
  n_nationkey integer PRIMARY KEY,
  n_name text,
  n_regionkey integer,
  n_comment text
);
CREATE TABLE orders (
  o_orderdate date,
  o_orderkey integer PRIMARY KEY,
  o_custkey integer,
  o_orderpriority text,
  o_shippriority integer,
  o_clerk text,
  o_orderstatus text,
  o_totalprice real,
  o_comment text
);
CREATE TABLE part (
  p_partkey integer PRIMARY KEY,
  p_type text,
  p_size integer,
  p_brand text,
  p_name text,
  p_container text,
  p_mfgr text,
  p_retailprice real,
  p_comment text
);
CREATE TABLE partsupp (
  ps_partkey integer PRIMARY KEY,
  ps_suppkey integer PRIMARY KEY,
  ps_supplycost real,
  ps_availqty integer,
  ps_comment text
);
CREATE TABLE region (
  r_regionkey integer PRIMARY KEY,
  r_name text,
  r_comment text
);
CREATE TABLE supplier (
  s_suppkey integer PRIMARY KEY,
  s_nationkey integer,
  s_comment text,
  s_name text,
  s_address text,
  s_phone text,
  s_acctbal real
);
-- foreign keys: customer.c_nationkey -> nation.n_nationkey; lineitem.l_partkey -> partsupp.ps_partkey; lineitem.l_suppkey -> partsupp.ps_suppkey; lineitem.l_orderkey -> orders.o_orderkey; nation.n_regionkey -> region.r_regionkey; orders.o_custkey -> customer.c_custkey; partsupp.ps_suppkey -> supplier.s_suppkey; partsupp.ps_partkey -> part.p_partkey; supplier.s_nationkey -> nation.n_nationkey

Hint: "Supplier#000000129" is the name of the supplier which refers to s_name; Which region refers to r_name;

Question: Which region does "Supplier#000000129" belong to?

assistant: SELECT T3.r_name FROM nation AS T1 INNER JOIN supplier AS T2 ON T1.n_nationkey = T2.s_nationkey INNER JOIN region AS T3 ON T1.n_regionkey = T3.r_regionkey WHERE T2.s_name = 'Supplier#000000129'
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 Student (
         StuID        INTEGER PRIMARY KEY,
         LName        VARCHAR(12),
         Fname        VARCHAR(12),
         Age      INTEGER,
         Sex      VARCHAR(1),
         Major        INTEGER,
         Advisor      INTEGER,
         city_code    VARCHAR(3)
  );


create table Club (
       ClubID           INTEGER PRIMARY KEY,
       ClubName         VARCHAR(40),
       ClubDesc         VARCHAR(1024),
       ClubLocation VARCHAR(40)
);

create table Member_of_club (
       StuID            INTEGER,
       ClubID           INTEGER,
       Position     VARCHAR(40),
       FOREIGN KEY(StuID) REFERENCES Student(StuID),
       FOREIGN KEY(ClubID) REFERENCES Club(ClubID)
);

Question: Count the members of the club "Tennis Club".

assistant: SELECT count(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = "Tennis Club"
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,
  First text,
  Last text,
  StreetAddress text,
  City text,
  State text,
  ZipCode integer,
  Email text,
  PhoneNumber text,
  FirstPurchaseDate date,
  SubscribedToEmailList text,
  Gender text
);
CREATE TABLE geolocation (
  LocationID integer PRIMARY KEY,
  Latitude real,
  Longitude real
);
CREATE TABLE location (
  LocationID integer PRIMARY KEY,
  LocationName text,
  StreetAddress text,
  City text,
  State text,
  ZipCode integer
);
CREATE TABLE rootbeerbrand (
  BrandID integer PRIMARY KEY,
  BrandName text,
  FirstBrewedYear integer,
  BreweryName text,
  City text,
  State text,
  Country text,
  Description text,
  CaneSugar text,
  CornSyrup text,
  Honey text,
  ArtificialSweetener text,
  Caffeinated text,
  Alcoholic text,
  AvailableInCans text,
  AvailableInBottles text,
  AvailableInKegs text,
  Website text,
  FacebookPage text,
  Twitter text,
  WholesaleCost real,
  CurrentRetailPrice real
);
CREATE TABLE rootbeer (
  RootBeerID integer PRIMARY KEY,
  BrandID integer,
  ContainerType text,
  LocationID integer,
  PurchaseDate date
);
CREATE TABLE rootbeerreview (
  CustomerID integer PRIMARY KEY,
  BrandID integer PRIMARY KEY,
  StarRating integer,
  ReviewDate date,
  Review text
);
CREATE TABLE transaction (
  TransactionID integer PRIMARY KEY,
  CreditCardNumber integer,
  CustomerID integer,
  TransactionDate date,
  CreditCardType text,
  LocationID integer,
  RootBeerID integer,
  PurchasePrice real
);
-- foreign keys: geolocation.LocationID -> location.LocationID; location.LocationID -> geolocation.LocationID; rootbeer.BrandID -> rootbeerbrand.BrandID; rootbeer.LocationID -> location.LocationID; rootbeer.LocationID -> geolocation.LocationID; rootbeerreview.BrandID -> rootbeerbrand.BrandID; rootbeerreview.CustomerID -> customers.CustomerID; transaction.RootBeerID -> rootbeer.RootBeerID; transaction.LocationID -> location.LocationID; transaction.CustomerID -> customers.CustomerID

Hint: name of the customer = First, Last; 5-star review refers to StarRating = 5;

Question: What is the name of all the customers who have ever given a 5-star review?

assistant: SELECT T1.First, T1.Last FROM customers AS T1 INNER JOIN rootbeerreview AS T2 ON T1.CustomerID = T2.CustomerID WHERE T2.StarRating = 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:
CREATE TABLE users (
  userid integer PRIMARY KEY,
  age text,
  u_gender text,
  occupation text
);
CREATE TABLE directors (
  directorid integer PRIMARY KEY,
  d_quality integer,
  avg_revenue integer
);
CREATE TABLE actors (
  actorid integer PRIMARY KEY,
  a_gender text,
  a_quality integer
);
CREATE TABLE movies (
  movieid integer PRIMARY KEY,
  year integer,
  isEnglish text,
  country text,
  runningtime integer
);
CREATE TABLE movies2actors (
  movieid integer PRIMARY KEY,
  actorid integer PRIMARY KEY,
  cast_num integer
);
CREATE TABLE movies2directors (
  movieid integer PRIMARY KEY,
  directorid integer PRIMARY KEY,
  genre text
);
CREATE TABLE u2base (
  userid integer PRIMARY KEY,
  movieid integer PRIMARY KEY,
  rating text
);

Hint: Female users mean that u_gender = 'F'

Question: How many of the users who rate the movie with the id '2462959' are female?

assistant: SELECT COUNT(T1.userid) FROM users AS T1 INNER JOIN u2base AS T2 ON T1.userid = T2.userid WHERE T2.userid = 2462959 AND T1.u_gender = 'F'
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 "Player_Attributes" (
	`id`	INTEGER PRIMARY KEY AUTOINCREMENT,
	`player_fifa_api_id`	INTEGER,
	`player_api_id`	INTEGER,
	`date`	TEXT,
	`overall_rating`	INTEGER,
	`potential`	INTEGER,
	`preferred_foot`	TEXT,
	`attacking_work_rate`	TEXT,
	`defensive_work_rate`	TEXT,
	`crossing`	INTEGER,
	`finishing`	INTEGER,
	`heading_accuracy`	INTEGER,
	`short_passing`	INTEGER,
	`volleys`	INTEGER,
	`dribbling`	INTEGER,
	`curve`	INTEGER,
	`free_kick_accuracy`	INTEGER,
	`long_passing`	INTEGER,
	`ball_control`	INTEGER,
	`acceleration`	INTEGER,
	`sprint_speed`	INTEGER,
	`agility`	INTEGER,
	`reactions`	INTEGER,
	`balance`	INTEGER,
	`shot_power`	INTEGER,
	`jumping`	INTEGER,
	`stamina`	INTEGER,
	`strength`	INTEGER,
	`long_shots`	INTEGER,
	`aggression`	INTEGER,
	`interceptions`	INTEGER,
	`positioning`	INTEGER,
	`vision`	INTEGER,
	`penalties`	INTEGER,
	`marking`	INTEGER,
	`standing_tackle`	INTEGER,
	`sliding_tackle`	INTEGER,
	`gk_diving`	INTEGER,
	`gk_handling`	INTEGER,
	`gk_kicking`	INTEGER,
	`gk_positioning`	INTEGER,
	`gk_reflexes`	INTEGER,
	FOREIGN KEY(`player_fifa_api_id`) REFERENCES `Player`(`player_fifa_api_id`),
	FOREIGN KEY(`player_api_id`) REFERENCES `Player`(`player_api_id`)
);

Question: What are the names of players who have the best dribbling?

assistant: SELECT DISTINCT T1.player_name FROM Player AS T1 JOIN Player_Attributes AS T2 ON T1.player_api_id = T2.player_api_id WHERE T2.dribbling = ( SELECT max(overall_rating) FROM Player_Attributes)