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 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: highest number of pages refers to MAX(COUNT(page_number));

Question: What is the name of the menu with the highest number of pages?

assistant: SELECT T1.name FROM Menu AS T1 INNER JOIN MenuPage AS T2 ON T1.id = T2.menu_id GROUP BY T2.menu_id ORDER BY COUNT(T2.page_number) 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 authors (
  au_id text PRIMARY KEY,
  au_lname text,
  au_fname text,
  phone text,
  address text,
  city text,
  state text,
  zip text,
  contract text
);
CREATE TABLE jobs (
  job_id integer PRIMARY KEY,
  job_desc text,
  min_lvl integer,
  max_lvl integer
);
CREATE TABLE publishers (
  pub_id text PRIMARY KEY,
  pub_name text,
  city text,
  state text,
  country text
);
CREATE TABLE employee (
  emp_id text PRIMARY KEY,
  fname text,
  minit text,
  lname text,
  job_id integer,
  job_lvl integer,
  pub_id text,
  hire_date datetime
);
CREATE TABLE pub_info (
  pub_id text PRIMARY KEY,
  logo blob,
  pr_info text
);
CREATE TABLE stores (
  stor_id text PRIMARY KEY,
  stor_name text,
  stor_address text,
  city text,
  state text,
  zip text
);
CREATE TABLE discounts (
  discounttype text,
  stor_id text,
  lowqty integer,
  highqty integer,
  discount real
);
CREATE TABLE titles (
  title_id text PRIMARY KEY,
  title text,
  type text,
  pub_id text,
  price real,
  advance real,
  royalty integer,
  ytd_sales integer,
  notes text,
  pubdate datetime
);
CREATE TABLE roysched (
  title_id text,
  lorange integer,
  hirange integer,
  royalty integer
);
CREATE TABLE sales (
  stor_id text PRIMARY KEY,
  ord_num text PRIMARY KEY,
  ord_date datetime,
  qty integer,
  payterms text,
  title_id text PRIMARY KEY
);
CREATE TABLE titleauthor (
  au_id text PRIMARY KEY,
  title_id text PRIMARY KEY,
  au_ord integer,
  royaltyper integer
);
-- foreign keys: employee.pub_id -> publishers.pub_id; employee.job_id -> jobs.job_id; pub_info.pub_id -> publishers.pub_id; discounts.stor_id -> stores.stor_id; titles.pub_id -> publishers.pub_id; roysched.title_id -> titles.title_id; sales.title_id -> titles.title_id; sales.stor_id -> stores.stor_id; titleauthor.title_id -> titles.title_id; titleauthor.au_id -> authors.au_id

Hint: year to date sales refers to ytd_sales; about the title refers to notes

Question: Of the titles, which title is about the Carefully researched study of the effects of strong emotions on the body, which state-based publisher published this book, and what is the year-to-date sale?

assistant: SELECT T1.title, T2.pub_name, T1.ytd_sales FROM titles AS T1 INNER JOIN publishers AS T2 ON T1.pub_id = T2.pub_id WHERE T1.notes = 'Carefully researched study of the effects of strong emotions on the body. Metabolic charts included.'
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 `pilot` (
  `Pilot_Id` int(11) NOT NULL,
  `Name` varchar(50) NOT NULL,
  `Age` int(11) NOT NULL,
  PRIMARY KEY (`Pilot_Id`)
);

Question: What are the names of the pilots in alphabetical order?

assistant: SELECT Name FROM pilot ORDER BY Name 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 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: film refers to title; rent for more than 5 days refers to rental_duration > 5

Question: List at least 10 films that the customers can rent for more than 5 days.

assistant: SELECT T.title FROM ( SELECT T1.title, COUNT(T3.customer_id) AS num FROM film AS T1 INNER JOIN inventory AS T2 ON T1.film_id = T2.film_id INNER JOIN rental AS T3 ON T2.inventory_id = T3.inventory_id WHERE T1.rental_duration > 5 GROUP BY T1.title ) AS T WHERE T.num > 10
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: average rating = AVG(Rating where Category = 'COMICS'); number of users who hold a positive attitude towards the app refers to SUM(Sentiment = 'Positive');

Question: What is the average rating of comic category apps? How many users hold positive attitude towards this app?

assistant: SELECT AVG(T1.Rating) , COUNT(CASE WHEN T2.Sentiment = 'Positive' THEN 1 ELSE NULL END) FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T1.Category = 'COMICS'
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,
  Customer Names text
);
CREATE TABLE Products (
  ProductID integer PRIMARY KEY,
  Product Name text
);
CREATE TABLE Regions (
  StateCode text PRIMARY KEY,
  State text,
  Region text
);
CREATE TABLE Sales Team (
  SalesTeamID integer PRIMARY KEY,
  Sales Team text,
  Region text
);
CREATE TABLE Store Locations (
  StoreID integer PRIMARY KEY,
  City Name text,
  County text,
  StateCode text,
  State text,
  Type text,
  Latitude real,
  Longitude real,
  AreaCode integer,
  Population integer,
  Household Income integer,
  Median Income integer,
  Land Area integer,
  Water Area integer,
  Time Zone text
);
CREATE TABLE Sales Orders (
  OrderNumber text PRIMARY KEY,
  Sales Channel text,
  WarehouseCode text,
  ProcuredDate text,
  OrderDate text,
  ShipDate text,
  DeliveryDate text,
  CurrencyCode text,
  _SalesTeamID integer,
  _CustomerID integer,
  _StoreID integer,
  _ProductID integer,
  Order Quantity integer,
  Discount Applied real,
  Unit Price text,
  Unit Cost text
);
-- foreign keys: Store Locations.StateCode -> Regions.StateCode; Sales Orders._ProductID -> Products.ProductID; Sales Orders._StoreID -> Store Locations.StoreID; Sales Orders._CustomerID -> Customers.CustomerID; Sales Orders._SalesTeamID -> Sales Team.SalesTeamID

Hint: DIVIDE(SUM(Order Quantity where City Name = 'Burbank' and SUBSTR(OrderDate, -2) = '18')), (SUM(Order Quantity where SUBSTR(OrderDate, -2) = '18')) as percentage;

Question: Find the percentage of products that were shipped from Burbank in 2018?

assistant: SELECT CAST(SUM(CASE WHEN T3.`City Name` = 'Burbank' THEN T2.`Order Quantity` ELSE 0 END) AS REAL) * 100 / SUM(T2.`Order Quantity`) FROM Products AS T1 INNER JOIN `Sales Orders` AS T2 ON T2._ProductID = T1.ProductID INNER JOIN `Store Locations` AS T3 ON T3.StoreID = T2._StoreID WHERE T2.OrderDate LIKE '%/%/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:
PRAGMA foreign_keys = ON;
CREATE TABLE `Course_Authors_and_Tutors` (
`author_id` INTEGER PRIMARY KEY,
`author_tutor_ATB` VARCHAR(3),
`login_name` VARCHAR(40),
`password` VARCHAR(40),
`personal_name` VARCHAR(80),
`middle_name` VARCHAR(80),
`family_name` VARCHAR(80),
`gender_mf` VARCHAR(1),
`address_line_1` VARCHAR(80)
);

Question: Return the completion date for all the tests that have "Fail" result.

assistant: SELECT T1.date_of_completion FROM Student_Course_Enrolment AS T1 JOIN Student_Tests_Taken AS T2 ON T1.registration_id = T2.registration_id WHERE T2.test_result = "Fail"
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: Northern California refers to region = 'northern california'

Question: What cities are located in Northern California?

assistant: SELECT city FROM geographic WHERE region = 'northern california'
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 City (
  ID integer PRIMARY KEY,
  Name text,
  CountryCode text,
  District text,
  Population integer
);
CREATE TABLE Country (
  Code text PRIMARY KEY,
  Name text,
  Continent text,
  Region text,
  SurfaceArea real,
  IndepYear integer,
  Population integer,
  LifeExpectancy real,
  GNP real,
  GNPOld real,
  LocalName text,
  GovernmentForm text,
  HeadOfState text,
  Capital integer,
  Code2 text
);
CREATE TABLE CountryLanguage (
  CountryCode text PRIMARY KEY,
  Language text PRIMARY KEY,
  IsOfficial text,
  Percentage real
);
-- foreign keys: City.CountryCode -> Country.Code; CountryLanguage.CountryCode -> Country.Code

Hint: year of independence refers to IndepYear; Brunei is a name of country;

Question: What is the year of independence of Brunei?

assistant: SELECT IndepYear FROM Country WHERE Name = 'Brunei'
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 Demog (
  GEOID integer PRIMARY KEY,
  INHABITANTS_K real,
  INCOME_K real,
  A_VAR1 real,
  A_VAR2 real,
  A_VAR3 real,
  A_VAR4 real,
  A_VAR5 real,
  A_VAR6 real,
  A_VAR7 real,
  A_VAR8 real,
  A_VAR9 real,
  A_VAR10 real,
  A_VAR11 real,
  A_VAR12 real,
  A_VAR13 real,
  A_VAR14 real,
  A_VAR15 real,
  A_VAR16 real,
  A_VAR17 real,
  A_VAR18 real
);
CREATE TABLE mailings3 (
  REFID integer PRIMARY KEY,
  REF_DATE datetime,
  RESPONSE text
);
CREATE TABLE Customers (
  ID integer PRIMARY KEY,
  SEX text,
  MARITAL_STATUS text,
  GEOID integer,
  EDUCATIONNUM integer,
  OCCUPATION text,
  age integer
);
CREATE TABLE Mailings1_2 (
  REFID integer PRIMARY KEY,
  REF_DATE datetime,
  RESPONSE text
);
CREATE TABLE Sales (
  EVENTID integer PRIMARY KEY,
  REFID integer,
  EVENT_DATE datetime,
  AMOUNT real
);

Hint: male customers ages from 20 to 30 years old refer to SEX = 'Male' where age BETWEEN 20 AND 30; farming or fishing refers to OCCUPATION; number of inhabitants refers to INHABITANTS_K;

Question: What is the number of inhabitants of male customers ages from 20 to 30 years old who are farming or fishing?

assistant: SELECT T2.INHABITANTS_K FROM Customers AS T1 INNER JOIN Demog AS T2 ON T1.GEOID = T2.GEOID WHERE T1.OCCUPATION = 'Farming-fishing' AND T1.SEX = 'Male' AND T1.age >= 20 AND T1.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:
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 Restaurant (
       ResID       INTEGER PRIMARY KEY,
       ResName     VARCHAR(100),
       Address     VARCHAR(100),
       Rating INTEGER
);

create table Type_Of_Restaurant (
       ResID       INTEGER,
       ResTypeID   INTEGER,
       FOREIGN KEY(ResID) REFERENCES Restaurant(ResID),
       FOREIGN KEY(ResTypeID) REFERENCES Restaurant_Type(ResTypeID)
);

create table Restaurant_Type (
       ResTypeID            INTEGER PRIMARY KEY,
       ResTypeName          VARCHAR(40),
       ResTypeDescription   VARCHAR(100)
);

create table Visits_Restaurant (
       StuID      INTEGER,
       ResID      INTEGER,
       Time       TIMESTAMP,
       Spent      FLOAT,
       FOREIGN KEY(StuID) REFERENCES Student(StuID),
       FOREIGN KEY(ResID) REFERENCES Restaurant(ResID)
);

Question: Which major has between 2 and 30 number of students? List major and the number of students.

assistant: SELECT Major , count(*) FROM Student GROUP BY Major HAVING count(Major) BETWEEN 2 AND 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 `Problem_Category_Codes` (
`problem_category_code` VARCHAR(20) PRIMARY KEY,
`problem_category_description` VARCHAR(80)
);

Question: What are the ids of the problems reported after the date of any problems reported by Rylan Homenick?

assistant: SELECT T1.problem_id FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE date_problem_reported > ( SELECT max(date_problem_reported) FROM problems AS T3 JOIN staff AS T4 ON T3.reported_by_staff_id = T4.staff_id WHERE T4.staff_first_name = "Rylan" AND T4.staff_last_name = "Homenick" )
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,
  Customer Names text
);
CREATE TABLE Products (
  ProductID integer PRIMARY KEY,
  Product Name text
);
CREATE TABLE Regions (
  StateCode text PRIMARY KEY,
  State text,
  Region text
);
CREATE TABLE Sales Team (
  SalesTeamID integer PRIMARY KEY,
  Sales Team text,
  Region text
);
CREATE TABLE Store Locations (
  StoreID integer PRIMARY KEY,
  City Name text,
  County text,
  StateCode text,
  State text,
  Type text,
  Latitude real,
  Longitude real,
  AreaCode integer,
  Population integer,
  Household Income integer,
  Median Income integer,
  Land Area integer,
  Water Area integer,
  Time Zone text
);
CREATE TABLE Sales Orders (
  OrderNumber text PRIMARY KEY,
  Sales Channel text,
  WarehouseCode text,
  ProcuredDate text,
  OrderDate text,
  ShipDate text,
  DeliveryDate text,
  CurrencyCode text,
  _SalesTeamID integer,
  _CustomerID integer,
  _StoreID integer,
  _ProductID integer,
  Order Quantity integer,
  Discount Applied real,
  Unit Price text,
  Unit Cost text
);
-- foreign keys: Store Locations.StateCode -> Regions.StateCode; Sales Orders._ProductID -> Products.ProductID; Sales Orders._StoreID -> Store Locations.StoreID; Sales Orders._CustomerID -> Customers.CustomerID; Sales Orders._SalesTeamID -> Sales Team.SalesTeamID

Hint: the lowest unit price refers to MIN(Unit Price);

Question: Please give the order number and product name of the order which has the lowest unit price.

assistant: SELECT T1.OrderNumber, T2.`Product Name` FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T2.ProductID = T1._ProductID WHERE REPLACE(T1.`Unit Price`, ',', '') = ( SELECT REPLACE(T1.`Unit Price`, ',', '') FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T2.ProductID = T1._ProductID ORDER BY REPLACE(T1.`Unit 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:
CREATE TABLE current (
  ballotpedia_id text,
  bioguide_id text PRIMARY KEY,
  birthday_bio date,
  cspan_id real PRIMARY KEY,
  fec_id text,
  first_name text,
  gender_bio text,
  google_entity_id_id text,
  govtrack_id integer,
  house_history_id real,
  icpsr_id real,
  last_name text,
  lis_id text,
  maplight_id real,
  middle_name text,
  nickname_name text,
  official_full_name text,
  opensecrets_id text,
  religion_bio text,
  suffix_name text,
  thomas_id integer,
  votesmart_id real,
  wikidata_id text,
  wikipedia_id text
);
CREATE TABLE current-terms (
  address text,
  bioguide text PRIMARY KEY,
  caucus text,
  chamber text,
  class real,
  contact_form text,
  district real,
  end text PRIMARY KEY,
  fax text,
  last text,
  name text,
  office text,
  party text,
  party_affiliations text,
  phone text,
  relation text,
  rss_url text,
  start text,
  state text,
  state_rank text,
  title text,
  type text,
  url text
);
CREATE TABLE historical (
  ballotpedia_id text,
  bioguide_id text PRIMARY KEY,
  bioguide_previous_id text,
  birthday_bio text,
  cspan_id text,
  fec_id text,
  first_name text,
  gender_bio text,
  google_entity_id_id text,
  govtrack_id integer,
  house_history_alternate_id text,
  house_history_id real,
  icpsr_id real,
  last_name text,
  lis_id text,
  maplight_id text,
  middle_name text,
  nickname_name text,
  official_full_name text,
  opensecrets_id text,
  religion_bio text,
  suffix_name text,
  thomas_id text,
  votesmart_id text,
  wikidata_id text,
  wikipedia_id text
);
CREATE TABLE historical-terms (
  address text,
  bioguide text PRIMARY KEY,
  chamber text,
  class real,
  contact_form text,
  district real,
  end text,
  fax text,
  last text,
  middle text,
  name text,
  office text,
  party text,
  party_affiliations text,
  phone text,
  relation text,
  rss_url text,
  start text,
  state text,
  state_rank text,
  title text,
  type text,
  url text
);
CREATE TABLE social-media (
  bioguide text PRIMARY KEY,
  facebook text,
  facebook_id real,
  govtrack real,
  instagram text,
  instagram_id real,
  thomas integer,
  twitter text,
  twitter_id real,
  youtube text,
  youtube_id text
);
-- foreign keys: current-terms.bioguide -> current.bioguide_id; historical-terms.bioguide -> historical.bioguide_id; social-media.bioguide -> current.bioguide_id

Hint: Wikipedia page names refers to wikipedia_id; anti-administration refers to party = 'Anti-Administration'; senators refers to type = 'sen';

Question: What are the Wikipedia page names of all the anti-administration senators?

assistant: SELECT T1.wikipedia_id FROM historical AS T1 INNER JOIN `historical-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T2.type = 'sen' AND T2.party = 'Anti-Administration'