db_id stringclasses 69
values | schema stringclasses 69
values | m_schema stringclasses 69
values | question stringlengths 24 325 | sql stringlengths 23 804 | evidence stringlengths 0 673 |
|---|---|---|---|---|---|
disney | CREATE TABLE characters
(
movie_title TEXT
primary key,
release_date TEXT,
hero TEXT,
villian TEXT,
song TEXT,
foreign key (hero) references "voice-actors"(character)
);
CREATE TABLE director
(
name TEXT
primary key,
director TEXT,
f... | 【DB_ID】 disney
【Schema】
# Table: main.characters
[
(movie_title:TEXT, Primary Key, Examples: [Aladdin]),
(release_date:TEXT, Examples: [21-Dec-37, 7-Feb-40, 13-Nov-40]),
(hero:TEXT, Examples: [Snow White, Pinocchio, Dumbo]),
(villian:TEXT, Examples: [Evil Queen, Stromboli, Chernabog]),
(song:TEXT, Examples: [Some Day M... | How many voice actors for the movie Aladdin? | SELECT COUNT('voice-actor') FROM `voice-actors` WHERE movie = 'Aladdin' | Aladdin is the name of the movie which refers to movie = 'Aladdin'; |
disney | CREATE TABLE characters
(
movie_title TEXT
primary key,
release_date TEXT,
hero TEXT,
villian TEXT,
song TEXT,
foreign key (hero) references "voice-actors"(character)
);
CREATE TABLE director
(
name TEXT
primary key,
director TEXT,
f... | 【DB_ID】 disney
【Schema】
# Table: main.characters
[
(movie_title:TEXT, Primary Key, Examples: [Aladdin]),
(release_date:TEXT, Examples: [21-Dec-37, 7-Feb-40, 13-Nov-40]),
(hero:TEXT, Examples: [Snow White, Pinocchio, Dumbo]),
(villian:TEXT, Examples: [Evil Queen, Stromboli, Chernabog]),
(song:TEXT, Examples: [Some Day M... | List the movie titles with the voice actor Jeff Bennet | SELECT movie FROM `voice-actors` WHERE 'voice-actor' = 'Jeff Bennett' | Jeff Bennett refers to voice-actor = 'Jeff Bennett'; |
disney | CREATE TABLE characters
(
movie_title TEXT
primary key,
release_date TEXT,
hero TEXT,
villian TEXT,
song TEXT,
foreign key (hero) references "voice-actors"(character)
);
CREATE TABLE director
(
name TEXT
primary key,
director TEXT,
f... | 【DB_ID】 disney
【Schema】
# Table: main.characters
[
(movie_title:TEXT, Primary Key, Examples: [Aladdin]),
(release_date:TEXT, Examples: [21-Dec-37, 7-Feb-40, 13-Nov-40]),
(hero:TEXT, Examples: [Snow White, Pinocchio, Dumbo]),
(villian:TEXT, Examples: [Evil Queen, Stromboli, Chernabog]),
(song:TEXT, Examples: [Some Day M... | Provide the director's name of Wreck-It Ralph movie. | SELECT director FROM director WHERE name = 'Wreck-It Ralph' | Wreck-It Ralph is the name of the movies which refers to name = 'Wreck-It Ralph'; |
disney | CREATE TABLE characters
(
movie_title TEXT
primary key,
release_date TEXT,
hero TEXT,
villian TEXT,
song TEXT,
foreign key (hero) references "voice-actors"(character)
);
CREATE TABLE director
(
name TEXT
primary key,
director TEXT,
f... | 【DB_ID】 disney
【Schema】
# Table: main.characters
[
(movie_title:TEXT, Primary Key, Examples: [Aladdin]),
(release_date:TEXT, Examples: [21-Dec-37, 7-Feb-40, 13-Nov-40]),
(hero:TEXT, Examples: [Snow White, Pinocchio, Dumbo]),
(villian:TEXT, Examples: [Evil Queen, Stromboli, Chernabog]),
(song:TEXT, Examples: [Some Day M... | What movies did director Jack Kinney direct? | SELECT name FROM director WHERE director = 'Jack Kinney' | FALSE; |
disney | CREATE TABLE characters
(
movie_title TEXT
primary key,
release_date TEXT,
hero TEXT,
villian TEXT,
song TEXT,
foreign key (hero) references "voice-actors"(character)
);
CREATE TABLE director
(
name TEXT
primary key,
director TEXT,
f... | 【DB_ID】 disney
【Schema】
# Table: main.characters
[
(movie_title:TEXT, Primary Key, Examples: [Aladdin]),
(release_date:TEXT, Examples: [21-Dec-37, 7-Feb-40, 13-Nov-40]),
(hero:TEXT, Examples: [Snow White, Pinocchio, Dumbo]),
(villian:TEXT, Examples: [Evil Queen, Stromboli, Chernabog]),
(song:TEXT, Examples: [Some Day M... | How many movies were released between 1937 and 1950? | SELECT COUNT(movie_title) FROM characters WHERE SUBSTR(release_date, LENGTH(release_date) - 1, LENGTH(release_date)) BETWEEN '37' AND '50' | released between 1937 and 1950 refers to substr(release_date, length(release_date) - 1,length(release_date)) between '37' and '50'; |
disney | CREATE TABLE characters
(
movie_title TEXT
primary key,
release_date TEXT,
hero TEXT,
villian TEXT,
song TEXT,
foreign key (hero) references "voice-actors"(character)
);
CREATE TABLE director
(
name TEXT
primary key,
director TEXT,
f... | 【DB_ID】 disney
【Schema】
# Table: main.characters
[
(movie_title:TEXT, Primary Key, Examples: [Aladdin]),
(release_date:TEXT, Examples: [21-Dec-37, 7-Feb-40, 13-Nov-40]),
(hero:TEXT, Examples: [Snow White, Pinocchio, Dumbo]),
(villian:TEXT, Examples: [Evil Queen, Stromboli, Chernabog]),
(song:TEXT, Examples: [Some Day M... | Provide the name of the song from the movie directed by Ben Sharpsteen. | SELECT T1.song FROM characters AS T1 INNER JOIN director AS T2 ON T1.movie_title = T2.name WHERE T2.director = 'Ben Sharpsteen' | Ben Sharpsteen refers to director = 'Ben Sharpsteen'; |
disney | CREATE TABLE characters
(
movie_title TEXT
primary key,
release_date TEXT,
hero TEXT,
villian TEXT,
song TEXT,
foreign key (hero) references "voice-actors"(character)
);
CREATE TABLE director
(
name TEXT
primary key,
director TEXT,
f... | 【DB_ID】 disney
【Schema】
# Table: main.characters
[
(movie_title:TEXT, Primary Key, Examples: [Aladdin]),
(release_date:TEXT, Examples: [21-Dec-37, 7-Feb-40, 13-Nov-40]),
(hero:TEXT, Examples: [Snow White, Pinocchio, Dumbo]),
(villian:TEXT, Examples: [Evil Queen, Stromboli, Chernabog]),
(song:TEXT, Examples: [Some Day M... | Indicate the release date of the film The Lion King directed by Roger Allers. | SELECT T1.release_date FROM characters AS T1 INNER JOIN director AS T2 ON T1.movie_title = T2.name WHERE T2.director = 'Roger Allers' AND T1.movie_title = 'The Lion King' | The Lion King refers to movie_title = 'The Lion King'; Roger Allers refers to director = 'Roger Allers'; |
disney | CREATE TABLE characters
(
movie_title TEXT
primary key,
release_date TEXT,
hero TEXT,
villian TEXT,
song TEXT,
foreign key (hero) references "voice-actors"(character)
);
CREATE TABLE director
(
name TEXT
primary key,
director TEXT,
f... | 【DB_ID】 disney
【Schema】
# Table: main.characters
[
(movie_title:TEXT, Primary Key, Examples: [Aladdin]),
(release_date:TEXT, Examples: [21-Dec-37, 7-Feb-40, 13-Nov-40]),
(hero:TEXT, Examples: [Snow White, Pinocchio, Dumbo]),
(villian:TEXT, Examples: [Evil Queen, Stromboli, Chernabog]),
(song:TEXT, Examples: [Some Day M... | Name the villain of the movie with Scott Weinger and Brad Kane as voice actors. | SELECT T1.villian FROM characters AS T1 INNER JOIN `voice-actors` AS T2 ON T1.movie_title = T2.movie WHERE T2.`voice-actor` = 'Scott Weinger Brad Kane' | FALSE; |
disney | CREATE TABLE characters
(
movie_title TEXT
primary key,
release_date TEXT,
hero TEXT,
villian TEXT,
song TEXT,
foreign key (hero) references "voice-actors"(character)
);
CREATE TABLE director
(
name TEXT
primary key,
director TEXT,
f... | 【DB_ID】 disney
【Schema】
# Table: main.characters
[
(movie_title:TEXT, Primary Key, Examples: [Aladdin]),
(release_date:TEXT, Examples: [21-Dec-37, 7-Feb-40, 13-Nov-40]),
(hero:TEXT, Examples: [Snow White, Pinocchio, Dumbo]),
(villian:TEXT, Examples: [Evil Queen, Stromboli, Chernabog]),
(song:TEXT, Examples: [Some Day M... | Which movies of director Wolfgang Reitherman do not have villain? | SELECT T1.movie_title FROM characters AS T1 INNER JOIN director AS T2 ON T1.movie_title = T2.name WHERE T2.director = 'Wolfgang Reitherman' AND T1.villian IS NULL | which movies do not have villain refer to movie_title where villian is null; |
disney | CREATE TABLE characters
(
movie_title TEXT
primary key,
release_date TEXT,
hero TEXT,
villian TEXT,
song TEXT,
foreign key (hero) references "voice-actors"(character)
);
CREATE TABLE director
(
name TEXT
primary key,
director TEXT,
f... | 【DB_ID】 disney
【Schema】
# Table: main.characters
[
(movie_title:TEXT, Primary Key, Examples: [Aladdin]),
(release_date:TEXT, Examples: [21-Dec-37, 7-Feb-40, 13-Nov-40]),
(hero:TEXT, Examples: [Snow White, Pinocchio, Dumbo]),
(villian:TEXT, Examples: [Evil Queen, Stromboli, Chernabog]),
(song:TEXT, Examples: [Some Day M... | List the titles of movies directed by Jack Kinney that were released before 1947. | SELECT T1.movie_title FROM characters AS T1 INNER JOIN director AS T2 ON T1.movie_title = T2.name WHERE T2.director = 'Jack Kinney' AND SUBSTR(T1.release_date, LENGTH(T1.release_date) - 1, LENGTH(T1.release_date)) < '47' | Jack Kinney refers to director = 'Jack Kinney'; released before 1947 refers to substr(release_date, length(release_date) - 1, length(release_date)) < '47'; |
disney | CREATE TABLE characters
(
movie_title TEXT
primary key,
release_date TEXT,
hero TEXT,
villian TEXT,
song TEXT,
foreign key (hero) references "voice-actors"(character)
);
CREATE TABLE director
(
name TEXT
primary key,
director TEXT,
f... | 【DB_ID】 disney
【Schema】
# Table: main.characters
[
(movie_title:TEXT, Primary Key, Examples: [Aladdin]),
(release_date:TEXT, Examples: [21-Dec-37, 7-Feb-40, 13-Nov-40]),
(hero:TEXT, Examples: [Snow White, Pinocchio, Dumbo]),
(villian:TEXT, Examples: [Evil Queen, Stromboli, Chernabog]),
(song:TEXT, Examples: [Some Day M... | List the names of the directors whose films grossed over $100 million. | SELECT DISTINCT T2.director FROM characters AS T1 INNER JOIN director AS T2 ON T1.movie_title = T2.name INNER JOIN movies_total_gross AS T3 ON T1.movie_title = T3.movie_title WHERE CAST(REPLACE(trim(T3.total_gross, '$'), ',', '') AS REAL) > 100000000 | films grossed over $100 million refer to movie_title where total_gross > 100000000; |
disney | CREATE TABLE characters
(
movie_title TEXT
primary key,
release_date TEXT,
hero TEXT,
villian TEXT,
song TEXT,
foreign key (hero) references "voice-actors"(character)
);
CREATE TABLE director
(
name TEXT
primary key,
director TEXT,
f... | 【DB_ID】 disney
【Schema】
# Table: main.characters
[
(movie_title:TEXT, Primary Key, Examples: [Aladdin]),
(release_date:TEXT, Examples: [21-Dec-37, 7-Feb-40, 13-Nov-40]),
(hero:TEXT, Examples: [Snow White, Pinocchio, Dumbo]),
(villian:TEXT, Examples: [Evil Queen, Stromboli, Chernabog]),
(song:TEXT, Examples: [Some Day M... | Which movie's song title has the highest total gross? | SELECT T2.song FROM movies_total_gross AS T1 INNER JOIN characters AS T2 ON T1.movie_title = T2.movie_title ORDER BY CAST(REPLACE(trim(T1.total_gross, '$'), ',', '') AS REAL) DESC LIMIT 1 | The highest total gross refers to MAX(total_gross); |
disney | CREATE TABLE characters
(
movie_title TEXT
primary key,
release_date TEXT,
hero TEXT,
villian TEXT,
song TEXT,
foreign key (hero) references "voice-actors"(character)
);
CREATE TABLE director
(
name TEXT
primary key,
director TEXT,
f... | 【DB_ID】 disney
【Schema】
# Table: main.characters
[
(movie_title:TEXT, Primary Key, Examples: [Aladdin]),
(release_date:TEXT, Examples: [21-Dec-37, 7-Feb-40, 13-Nov-40]),
(hero:TEXT, Examples: [Snow White, Pinocchio, Dumbo]),
(villian:TEXT, Examples: [Evil Queen, Stromboli, Chernabog]),
(song:TEXT, Examples: [Some Day M... | Which director had the most popular film from 1937 to 1990? | SELECT T2.director FROM characters AS T1 INNER JOIN director AS T2 ON T1.movie_title = T2.name INNER JOIN movies_total_gross AS T3 ON T3.movie_title = T1.movie_title WHERE SUBSTR(T3.release_date, LENGTH(T3.release_date) - 3, LENGTH(T3.release_date)) BETWEEN '1937' AND '1990' ORDER BY CAST(REPLACE(trim(T3.total_gross, '... | from 1937 to 1990 refers to substr(release_date, length(release_date) - 3, length(release_date)) between '1937' and '1990'; the most popular film refers to movie_title where MAX(total_gross); |
disney | CREATE TABLE characters
(
movie_title TEXT
primary key,
release_date TEXT,
hero TEXT,
villian TEXT,
song TEXT,
foreign key (hero) references "voice-actors"(character)
);
CREATE TABLE director
(
name TEXT
primary key,
director TEXT,
f... | 【DB_ID】 disney
【Schema】
# Table: main.characters
[
(movie_title:TEXT, Primary Key, Examples: [Aladdin]),
(release_date:TEXT, Examples: [21-Dec-37, 7-Feb-40, 13-Nov-40]),
(hero:TEXT, Examples: [Snow White, Pinocchio, Dumbo]),
(villian:TEXT, Examples: [Evil Queen, Stromboli, Chernabog]),
(song:TEXT, Examples: [Some Day M... | List all the main characters of the movie that are comedy genre. | SELECT T2.hero FROM movies_total_gross AS T1 INNER JOIN characters AS T2 ON T1.movie_title = T2.movie_title WHERE T1.genre = 'Comedy' | Comedy refers to genre = 'Comedy'; the main character of the movie refers to hero; |
disney | CREATE TABLE characters
(
movie_title TEXT
primary key,
release_date TEXT,
hero TEXT,
villian TEXT,
song TEXT,
foreign key (hero) references "voice-actors"(character)
);
CREATE TABLE director
(
name TEXT
primary key,
director TEXT,
f... | 【DB_ID】 disney
【Schema】
# Table: main.characters
[
(movie_title:TEXT, Primary Key, Examples: [Aladdin]),
(release_date:TEXT, Examples: [21-Dec-37, 7-Feb-40, 13-Nov-40]),
(hero:TEXT, Examples: [Snow White, Pinocchio, Dumbo]),
(villian:TEXT, Examples: [Evil Queen, Stromboli, Chernabog]),
(song:TEXT, Examples: [Some Day M... | Provide the names of voice actors for the characters of films directed by Wolfgang Reitherman. | SELECT T2.hero, T1.`voice-actor` FROM `voice-actors` AS T1 INNER JOIN characters AS T2 ON T1.movie = T2.movie_title INNER JOIN director AS T3 ON T3.name = T2.movie_title WHERE T3.director = 'Wolfgang Reitherman' | Wolfgang Reitherman refers to director = 'Wolfgang Reitherman'; |
disney | CREATE TABLE characters
(
movie_title TEXT
primary key,
release_date TEXT,
hero TEXT,
villian TEXT,
song TEXT,
foreign key (hero) references "voice-actors"(character)
);
CREATE TABLE director
(
name TEXT
primary key,
director TEXT,
f... | 【DB_ID】 disney
【Schema】
# Table: main.characters
[
(movie_title:TEXT, Primary Key, Examples: [Aladdin]),
(release_date:TEXT, Examples: [21-Dec-37, 7-Feb-40, 13-Nov-40]),
(hero:TEXT, Examples: [Snow White, Pinocchio, Dumbo]),
(villian:TEXT, Examples: [Evil Queen, Stromboli, Chernabog]),
(song:TEXT, Examples: [Some Day M... | What genre of movie has Taran as the main character? | SELECT T1.genre FROM movies_total_gross AS T1 INNER JOIN characters AS T2 ON T1.movie_title = T2.movie_title WHERE T2.hero = 'Taran' | Taran is the main character of the movie which refers to hero = 'Taran'; |
disney | CREATE TABLE characters
(
movie_title TEXT
primary key,
release_date TEXT,
hero TEXT,
villian TEXT,
song TEXT,
foreign key (hero) references "voice-actors"(character)
);
CREATE TABLE director
(
name TEXT
primary key,
director TEXT,
f... | 【DB_ID】 disney
【Schema】
# Table: main.characters
[
(movie_title:TEXT, Primary Key, Examples: [Aladdin]),
(release_date:TEXT, Examples: [21-Dec-37, 7-Feb-40, 13-Nov-40]),
(hero:TEXT, Examples: [Snow White, Pinocchio, Dumbo]),
(villian:TEXT, Examples: [Evil Queen, Stromboli, Chernabog]),
(song:TEXT, Examples: [Some Day M... | The main character Elsa is voiced by which actor and who is the director of the movie? | 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' | Elsa is the main character of the movie which refers to hero = 'Elsa'; voiced by which actor refers to voice-actor; |
disney | CREATE TABLE characters
(
movie_title TEXT
primary key,
release_date TEXT,
hero TEXT,
villian TEXT,
song TEXT,
foreign key (hero) references "voice-actors"(character)
);
CREATE TABLE director
(
name TEXT
primary key,
director TEXT,
f... | 【DB_ID】 disney
【Schema】
# Table: main.characters
[
(movie_title:TEXT, Primary Key, Examples: [Aladdin]),
(release_date:TEXT, Examples: [21-Dec-37, 7-Feb-40, 13-Nov-40]),
(hero:TEXT, Examples: [Snow White, Pinocchio, Dumbo]),
(villian:TEXT, Examples: [Evil Queen, Stromboli, Chernabog]),
(song:TEXT, Examples: [Some Day M... | Calculate the percentage of directors whose films grossed over $100 million. | SELECT CAST(COUNT(DISTINCT CASE WHEN CAST(REPLACE(trim(T1.total_gross, '$'), ',', '') AS REAL) > 100000000 THEN T3.director ELSE NULL END) AS REAL) * 100 / COUNT(DISTINCT T3.director) FROM movies_total_gross AS T1 INNER JOIN characters AS T2 ON T1.movie_title = T2.movie_title INNER JOIN director AS T3 ON T1.movie_title... | DIVIDE(COUNT(director where total_gross > 100000000), COUNT(director)) as percentage; |
disney | CREATE TABLE characters
(
movie_title TEXT
primary key,
release_date TEXT,
hero TEXT,
villian TEXT,
song TEXT,
foreign key (hero) references "voice-actors"(character)
);
CREATE TABLE director
(
name TEXT
primary key,
director TEXT,
f... | 【DB_ID】 disney
【Schema】
# Table: main.characters
[
(movie_title:TEXT, Primary Key, Examples: [Aladdin]),
(release_date:TEXT, Examples: [21-Dec-37, 7-Feb-40, 13-Nov-40]),
(hero:TEXT, Examples: [Snow White, Pinocchio, Dumbo]),
(villian:TEXT, Examples: [Evil Queen, Stromboli, Chernabog]),
(song:TEXT, Examples: [Some Day M... | Calculate the percentage of voice actors whose main character in the movie is in the Drama genre. | SELECT CAST(COUNT(CASE WHEN T1.genre = 'Drama' THEN T3.`voice-actor` ELSE NULL END) AS REAL) * 100 / COUNT(T3.`voice-actor`) FROM movies_total_gross AS T1 INNER JOIN characters AS T2 ON T1.movie_title = T2.movie_title INNER JOIN `voice-actors` AS T3 ON T3.movie = T1.movie_title | DIVIDE(COUNT(voice-actor where genre = 'Drama'), COUNT(voice-actor)) as percentage; |
disney | CREATE TABLE characters
(
movie_title TEXT
primary key,
release_date TEXT,
hero TEXT,
villian TEXT,
song TEXT,
foreign key (hero) references "voice-actors"(character)
);
CREATE TABLE director
(
name TEXT
primary key,
director TEXT,
f... | 【DB_ID】 disney
【Schema】
# Table: main.characters
[
(movie_title:TEXT, Primary Key, Examples: [Aladdin]),
(release_date:TEXT, Examples: [21-Dec-37, 7-Feb-40, 13-Nov-40]),
(hero:TEXT, Examples: [Snow White, Pinocchio, Dumbo]),
(villian:TEXT, Examples: [Evil Queen, Stromboli, Chernabog]),
(song:TEXT, Examples: [Some Day M... | Name the first movie released by Disney. | SELECT movie_title FROM characters ORDER BY SUBSTR(release_date, LENGTH(release_date) - 1, LENGTH(release_date)) ASC LIMIT 1 | The first movie released refers to movie_title where substr(release_date, length(release_date) - 1, length(release_date)) asc limit 1; |
disney | CREATE TABLE characters
(
movie_title TEXT
primary key,
release_date TEXT,
hero TEXT,
villian TEXT,
song TEXT,
foreign key (hero) references "voice-actors"(character)
);
CREATE TABLE director
(
name TEXT
primary key,
director TEXT,
f... | 【DB_ID】 disney
【Schema】
# Table: main.characters
[
(movie_title:TEXT, Primary Key, Examples: [Aladdin]),
(release_date:TEXT, Examples: [21-Dec-37, 7-Feb-40, 13-Nov-40]),
(hero:TEXT, Examples: [Snow White, Pinocchio, Dumbo]),
(villian:TEXT, Examples: [Evil Queen, Stromboli, Chernabog]),
(song:TEXT, Examples: [Some Day M... | How many movies were released by Disney between 2010 and 2016? | SELECT COUNT(movie_title) FROM characters WHERE SUBSTR(release_date, LENGTH(release_date) - 1, LENGTH(release_date)) BETWEEN '10' AND '16' | Movies refer to movie_title; released between 2010 and 2016 refers to substr(release_date, length(release_date) - 1, length(release_date)) between '10' and '16'; |
disney | CREATE TABLE characters
(
movie_title TEXT
primary key,
release_date TEXT,
hero TEXT,
villian TEXT,
song TEXT,
foreign key (hero) references "voice-actors"(character)
);
CREATE TABLE director
(
name TEXT
primary key,
director TEXT,
f... | 【DB_ID】 disney
【Schema】
# Table: main.characters
[
(movie_title:TEXT, Primary Key, Examples: [Aladdin]),
(release_date:TEXT, Examples: [21-Dec-37, 7-Feb-40, 13-Nov-40]),
(hero:TEXT, Examples: [Snow White, Pinocchio, Dumbo]),
(villian:TEXT, Examples: [Evil Queen, Stromboli, Chernabog]),
(song:TEXT, Examples: [Some Day M... | Who was the first ever Disney villain? | SELECT villian FROM characters ORDER BY SUBSTR(release_date, LENGTH(release_date) - 1, LENGTH(release_date)) DESC LIMIT 1 | the first ever villian is villian that was released before all others in time which refers to substr(release_date, length(release_date) - 1, length(release_date)) desc limit 1; |
disney | CREATE TABLE characters
(
movie_title TEXT
primary key,
release_date TEXT,
hero TEXT,
villian TEXT,
song TEXT,
foreign key (hero) references "voice-actors"(character)
);
CREATE TABLE director
(
name TEXT
primary key,
director TEXT,
f... | 【DB_ID】 disney
【Schema】
# Table: main.characters
[
(movie_title:TEXT, Primary Key, Examples: [Aladdin]),
(release_date:TEXT, Examples: [21-Dec-37, 7-Feb-40, 13-Nov-40]),
(hero:TEXT, Examples: [Snow White, Pinocchio, Dumbo]),
(villian:TEXT, Examples: [Evil Queen, Stromboli, Chernabog]),
(song:TEXT, Examples: [Some Day M... | What is Disney's highest grossing action movie? | SELECT movie_title FROM movies_total_gross WHERE genre = 'Action' ORDER BY CAST(REPLACE(trim(total_gross, '$'), ',', '') AS REAL) DESC LIMIT 1 | action movie refers to movie_title where genre = 'Action'; highest grossing movie refers to MAX(total_gross) |
disney | CREATE TABLE characters
(
movie_title TEXT
primary key,
release_date TEXT,
hero TEXT,
villian TEXT,
song TEXT,
foreign key (hero) references "voice-actors"(character)
);
CREATE TABLE director
(
name TEXT
primary key,
director TEXT,
f... | 【DB_ID】 disney
【Schema】
# Table: main.characters
[
(movie_title:TEXT, Primary Key, Examples: [Aladdin]),
(release_date:TEXT, Examples: [21-Dec-37, 7-Feb-40, 13-Nov-40]),
(hero:TEXT, Examples: [Snow White, Pinocchio, Dumbo]),
(villian:TEXT, Examples: [Evil Queen, Stromboli, Chernabog]),
(song:TEXT, Examples: [Some Day M... | Which actor voices Akela from The Jungle Book? | SELECT `voice-actor` FROM `voice-actors` WHERE character = 'Akela' | Akela refers character = 'Akela'; which actor voices refers to voice-actor; |
disney | CREATE TABLE characters
(
movie_title TEXT
primary key,
release_date TEXT,
hero TEXT,
villian TEXT,
song TEXT,
foreign key (hero) references "voice-actors"(character)
);
CREATE TABLE director
(
name TEXT
primary key,
director TEXT,
f... | 【DB_ID】 disney
【Schema】
# Table: main.characters
[
(movie_title:TEXT, Primary Key, Examples: [Aladdin]),
(release_date:TEXT, Examples: [21-Dec-37, 7-Feb-40, 13-Nov-40]),
(hero:TEXT, Examples: [Snow White, Pinocchio, Dumbo]),
(villian:TEXT, Examples: [Evil Queen, Stromboli, Chernabog]),
(song:TEXT, Examples: [Some Day M... | Determine Disney's total box office gross between 2010 and 2016. | SELECT SUM(Total) FROM revenue WHERE `Year` BETWEEN 2010 AND 2016 | between 2010 and 2016 refers to Year between 2010 and 2016; |
disney | CREATE TABLE characters
(
movie_title TEXT
primary key,
release_date TEXT,
hero TEXT,
villian TEXT,
song TEXT,
foreign key (hero) references "voice-actors"(character)
);
CREATE TABLE director
(
name TEXT
primary key,
director TEXT,
f... | 【DB_ID】 disney
【Schema】
# Table: main.characters
[
(movie_title:TEXT, Primary Key, Examples: [Aladdin]),
(release_date:TEXT, Examples: [21-Dec-37, 7-Feb-40, 13-Nov-40]),
(hero:TEXT, Examples: [Snow White, Pinocchio, Dumbo]),
(villian:TEXT, Examples: [Evil Queen, Stromboli, Chernabog]),
(song:TEXT, Examples: [Some Day M... | Name the main character of Disney's most popular adventure movie based on its inflation-adjusted gross. | SELECT T2.hero FROM movies_total_gross AS T1 INNER JOIN characters AS T2 ON T1.movie_title = T2.movie_title WHERE T1.genre = 'Adventure' ORDER BY CAST(REPLACE(trim(T1.inflation_adjusted_gross, '$'), ',', '') AS REAL) DESC LIMIT 1 | adventure movie refers to genre = 'Adventure'; the main character of the movie refers to hero; most popular movie based on its inflation-adjusted gross refers to where MAX(inflation_adjusted_gross); |
disney | CREATE TABLE characters
(
movie_title TEXT
primary key,
release_date TEXT,
hero TEXT,
villian TEXT,
song TEXT,
foreign key (hero) references "voice-actors"(character)
);
CREATE TABLE director
(
name TEXT
primary key,
director TEXT,
f... | 【DB_ID】 disney
【Schema】
# Table: main.characters
[
(movie_title:TEXT, Primary Key, Examples: [Aladdin]),
(release_date:TEXT, Examples: [21-Dec-37, 7-Feb-40, 13-Nov-40]),
(hero:TEXT, Examples: [Snow White, Pinocchio, Dumbo]),
(villian:TEXT, Examples: [Evil Queen, Stromboli, Chernabog]),
(song:TEXT, Examples: [Some Day M... | Name the director of Disney's lowest grossing movie. | SELECT T2.director FROM movies_total_gross AS T1 INNER JOIN director AS T2 ON T1.movie_title = T2.name ORDER BY CAST(REPLACE(trim(T1.total_gross, '$'), ',', '') AS REAL) ASC LIMIT 1 | lowest grossing movie refers to movie_title where MIN(total_gross); |
disney | CREATE TABLE characters
(
movie_title TEXT
primary key,
release_date TEXT,
hero TEXT,
villian TEXT,
song TEXT,
foreign key (hero) references "voice-actors"(character)
);
CREATE TABLE director
(
name TEXT
primary key,
director TEXT,
f... | 【DB_ID】 disney
【Schema】
# Table: main.characters
[
(movie_title:TEXT, Primary Key, Examples: [Aladdin]),
(release_date:TEXT, Examples: [21-Dec-37, 7-Feb-40, 13-Nov-40]),
(hero:TEXT, Examples: [Snow White, Pinocchio, Dumbo]),
(villian:TEXT, Examples: [Evil Queen, Stromboli, Chernabog]),
(song:TEXT, Examples: [Some Day M... | Find out what proportion of total revenue Walt Disney Parks and Resorts received in 2010. | SELECT SUM(`Walt Disney Parks and Resorts`) / SUM(Total) * 100 FROM revenue WHERE year = 2010 | DIVIDE(Walt Disney Parks and Resorts where year = 2010), SUM(year = 2010) as percentage; |
disney | CREATE TABLE characters
(
movie_title TEXT
primary key,
release_date TEXT,
hero TEXT,
villian TEXT,
song TEXT,
foreign key (hero) references "voice-actors"(character)
);
CREATE TABLE director
(
name TEXT
primary key,
director TEXT,
f... | 【DB_ID】 disney
【Schema】
# Table: main.characters
[
(movie_title:TEXT, Primary Key, Examples: [Aladdin]),
(release_date:TEXT, Examples: [21-Dec-37, 7-Feb-40, 13-Nov-40]),
(hero:TEXT, Examples: [Snow White, Pinocchio, Dumbo]),
(villian:TEXT, Examples: [Evil Queen, Stromboli, Chernabog]),
(song:TEXT, Examples: [Some Day M... | Determine the average gross for Disney's PG-13-rated action movies. | SELECT SUM(CAST(REPLACE(trim(total_gross, '$'), ',', '') AS REAL)) / COUNT(movie_title) FROM movies_total_gross WHERE MPAA_rating = 'PG-13' | DIVIDE(SUM(total_gross where genre = 'Action' and MPAA_rating = 'PG-13'), COUNT(movie_title where genre = 'Action' and MPAA_rating = 'PG-13')); |
disney | CREATE TABLE characters
(
movie_title TEXT
primary key,
release_date TEXT,
hero TEXT,
villian TEXT,
song TEXT,
foreign key (hero) references "voice-actors"(character)
);
CREATE TABLE director
(
name TEXT
primary key,
director TEXT,
f... | 【DB_ID】 disney
【Schema】
# Table: main.characters
[
(movie_title:TEXT, Primary Key, Examples: [Aladdin]),
(release_date:TEXT, Examples: [21-Dec-37, 7-Feb-40, 13-Nov-40]),
(hero:TEXT, Examples: [Snow White, Pinocchio, Dumbo]),
(villian:TEXT, Examples: [Evil Queen, Stromboli, Chernabog]),
(song:TEXT, Examples: [Some Day M... | How many voice-actors were involved in the Bambi movie? | SELECT COUNT(DISTINCT 'voice-actor') FROM `voice-actors` WHERE movie = 'Bambi' | Bambi is the name of the movie which refers to movie = 'Bambi'; |
disney | CREATE TABLE characters
(
movie_title TEXT
primary key,
release_date TEXT,
hero TEXT,
villian TEXT,
song TEXT,
foreign key (hero) references "voice-actors"(character)
);
CREATE TABLE director
(
name TEXT
primary key,
director TEXT,
f... | 【DB_ID】 disney
【Schema】
# Table: main.characters
[
(movie_title:TEXT, Primary Key, Examples: [Aladdin]),
(release_date:TEXT, Examples: [21-Dec-37, 7-Feb-40, 13-Nov-40]),
(hero:TEXT, Examples: [Snow White, Pinocchio, Dumbo]),
(villian:TEXT, Examples: [Evil Queen, Stromboli, Chernabog]),
(song:TEXT, Examples: [Some Day M... | Find the estimated inflation rate that was used to adjust the 1995 box office revenue for Disney's films. | SELECT SUM(CAST(REPLACE(trim(inflation_adjusted_gross, '$'), ',', '') AS REAL)) / SUM(CAST(REPLACE(trim(total_gross, '$'), ',', '') AS REAL)) FROM movies_total_gross WHERE SUBSTR(release_date, LENGTH(release_date) - 3, LENGTH(release_date)) = '1995' GROUP BY SUBSTR(release_date, LENGTH(release_date) - 3, LENGTH(release... | DIVIDE(inflation_adjusted_gross, total_gross) as percentage where substr(release_date, length(release_date) - 3, length(release_date)) = '1995'; |
disney | CREATE TABLE characters
(
movie_title TEXT
primary key,
release_date TEXT,
hero TEXT,
villian TEXT,
song TEXT,
foreign key (hero) references "voice-actors"(character)
);
CREATE TABLE director
(
name TEXT
primary key,
director TEXT,
f... | 【DB_ID】 disney
【Schema】
# Table: main.characters
[
(movie_title:TEXT, Primary Key, Examples: [Aladdin]),
(release_date:TEXT, Examples: [21-Dec-37, 7-Feb-40, 13-Nov-40]),
(hero:TEXT, Examples: [Snow White, Pinocchio, Dumbo]),
(villian:TEXT, Examples: [Evil Queen, Stromboli, Chernabog]),
(song:TEXT, Examples: [Some Day M... | What is the difference in the current gross of Cars and its sequel, Cars 2? Which movie is more popular? | SELECT SUM(CASE WHEN movie_title = 'Cars' THEN CAST(REPLACE(trim(inflation_adjusted_gross, '$'), ',', '') AS REAL) ELSE 0 END), SUM(CASE WHEN movie_title = 'Cars 2' THEN CAST(REPLACE(trim(inflation_adjusted_gross, '$'), ',', '') AS REAL) ELSE 0 END) FROM movies_total_gross | SUBTRACT(inflation_adjusted_gross where movie_title = 'Cars', inflation_adjusted_gross where movie_title = 'Cars 2'); more popular movie refers to movie_title where MAX(inflation_adjusted_gross); |
disney | CREATE TABLE characters
(
movie_title TEXT
primary key,
release_date TEXT,
hero TEXT,
villian TEXT,
song TEXT,
foreign key (hero) references "voice-actors"(character)
);
CREATE TABLE director
(
name TEXT
primary key,
director TEXT,
f... | 【DB_ID】 disney
【Schema】
# Table: main.characters
[
(movie_title:TEXT, Primary Key, Examples: [Aladdin]),
(release_date:TEXT, Examples: [21-Dec-37, 7-Feb-40, 13-Nov-40]),
(hero:TEXT, Examples: [Snow White, Pinocchio, Dumbo]),
(villian:TEXT, Examples: [Evil Queen, Stromboli, Chernabog]),
(song:TEXT, Examples: [Some Day M... | Name the most recent movie directed by Chris Buck. Which of his movies was more successful in terms of grossing? Use the current gross for comparison. | SELECT T1.movie_title, MAX(T1.release_date), MAX(T1.inflation_adjusted_gross) FROM movies_total_gross AS T1 INNER JOIN director AS T2 ON T1.movie_title = T2.name WHERE T2.director = 'Chris Buck' | Chris Buck refers to director = 'Chris Buck'; the most recent movie refers to movie_title where MAX(release_date); current gross refers to inflation_adjusted_gross; more successful movie refers to MAX(inflation_adjusted_gross); |
disney | CREATE TABLE characters
(
movie_title TEXT
primary key,
release_date TEXT,
hero TEXT,
villian TEXT,
song TEXT,
foreign key (hero) references "voice-actors"(character)
);
CREATE TABLE director
(
name TEXT
primary key,
director TEXT,
f... | 【DB_ID】 disney
【Schema】
# Table: main.characters
[
(movie_title:TEXT, Primary Key, Examples: [Aladdin]),
(release_date:TEXT, Examples: [21-Dec-37, 7-Feb-40, 13-Nov-40]),
(hero:TEXT, Examples: [Snow White, Pinocchio, Dumbo]),
(villian:TEXT, Examples: [Evil Queen, Stromboli, Chernabog]),
(song:TEXT, Examples: [Some Day M... | Name actors who voiced more than five Disney characters. | SELECT 'voice-actor' FROM `voice-actors` GROUP BY 'voice-actor' HAVING COUNT(movie) > 5 | Actors who voiced refer to voice-actor; |
disney | CREATE TABLE characters
(
movie_title TEXT
primary key,
release_date TEXT,
hero TEXT,
villian TEXT,
song TEXT,
foreign key (hero) references "voice-actors"(character)
);
CREATE TABLE director
(
name TEXT
primary key,
director TEXT,
f... | 【DB_ID】 disney
【Schema】
# Table: main.characters
[
(movie_title:TEXT, Primary Key, Examples: [Aladdin]),
(release_date:TEXT, Examples: [21-Dec-37, 7-Feb-40, 13-Nov-40]),
(hero:TEXT, Examples: [Snow White, Pinocchio, Dumbo]),
(villian:TEXT, Examples: [Evil Queen, Stromboli, Chernabog]),
(song:TEXT, Examples: [Some Day M... | Name the top 5 highest-grossing Disney movies adjusted for inflation. Identify the percentage they contributed to the total of Disney's current gross. | SELECT SUM(CASE WHEN CAST(REPLACE(trim(inflation_adjusted_gross, '$'), ',', '') AS REAL) > 1236035515 THEN CAST(REPLACE(trim(inflation_adjusted_gross, '$'), ',', '') AS REAL) ELSE 0 END) * 100 / SUM(CAST(REPLACE(trim(inflation_adjusted_gross, '$'), ',', '') AS REAL)) FROM movies_total_gross | The top 5 highest-grossing movies adjusted for inflation refer to MAX(inflation_adjusted_gross)LIMIT 5; DIVIDE(SUM(MAX(inflation_adjusted_gross LIMIT 5)), SUM(inflation_adjusted_gross)) as percentage; |
disney | CREATE TABLE characters
(
movie_title TEXT
primary key,
release_date TEXT,
hero TEXT,
villian TEXT,
song TEXT,
foreign key (hero) references "voice-actors"(character)
);
CREATE TABLE director
(
name TEXT
primary key,
director TEXT,
f... | 【DB_ID】 disney
【Schema】
# Table: main.characters
[
(movie_title:TEXT, Primary Key, Examples: [Aladdin]),
(release_date:TEXT, Examples: [21-Dec-37, 7-Feb-40, 13-Nov-40]),
(hero:TEXT, Examples: [Snow White, Pinocchio, Dumbo]),
(villian:TEXT, Examples: [Evil Queen, Stromboli, Chernabog]),
(song:TEXT, Examples: [Some Day M... | Among all Disney movies directed by Gary Trousdale, determine the percentage that earned over USD100m based on actual grossing. | SELECT CAST(COUNT(CASE WHEN CAST(REPLACE(trim(T1.total_gross, '$'), ',', '') AS REAL) > 100000000 THEN T1.movie_title ELSE NULL END) AS REAL) * 100 / COUNT(T1.movie_title) FROM movies_total_gross AS T1 INNER JOIN director AS T2 ON T1.movie_title = T2.name WHERE T2.director = 'Gary Trousdale' | DIVIDE(COUNT(movie_title where director = 'Gary Trousdale' and total_gross > 100000000), COUNT(movie_title where director = 'Gary Trousdale')) as percentage; |
legislator | CREATE TABLE current
(
ballotpedia_id TEXT,
bioguide_id TEXT,
birthday_bio DATE,
cspan_id REAL,
fec_id TEXT,
first_name TEXT,
gender_bio TEXT,
google_entity_id_id TEXT,
govtrack_id INTEGER,
house_history_id ... | 【DB_ID】 legislator
【Schema】
# Table: main.current
[
(ballotpedia_id:TEXT, Examples: [Sherrod Brown, Maria Cantwell, Ben Cardin]),
(bioguide_id:TEXT, Primary Key, Examples: [A000055, A000360, A000367]),
(birthday_bio:DATE, Examples: [1952-11-09]),
(cspan_id:REAL, Primary Key, Examples: [45516.0, 5.0, 1033767.0]),
(fec_i... | How many current legislators do not have an account on ballotpedia.org ? | SELECT COUNT(*) FROM current WHERE ballotpedia_id = '' OR ballotpedia_id IS NULL | do not have an account on ballotpedia.org refers to ballotpedia_id IS NULL OR ballotpedia_id = '' |
legislator | CREATE TABLE current
(
ballotpedia_id TEXT,
bioguide_id TEXT,
birthday_bio DATE,
cspan_id REAL,
fec_id TEXT,
first_name TEXT,
gender_bio TEXT,
google_entity_id_id TEXT,
govtrack_id INTEGER,
house_history_id ... | 【DB_ID】 legislator
【Schema】
# Table: main.current
[
(ballotpedia_id:TEXT, Examples: [Sherrod Brown, Maria Cantwell, Ben Cardin]),
(bioguide_id:TEXT, Primary Key, Examples: [A000055, A000360, A000367]),
(birthday_bio:DATE, Examples: [1952-11-09]),
(cspan_id:REAL, Primary Key, Examples: [45516.0, 5.0, 1033767.0]),
(fec_i... | Please list the official full names of all the current legislators who do not have an account on C-SPAN's video website. | SELECT official_full_name FROM current WHERE cspan_id IS NULL OR cspan_id = '' | legislators who do not have an account refers to cspan_id IS NULL OR cspan_id = '' |
legislator | CREATE TABLE current
(
ballotpedia_id TEXT,
bioguide_id TEXT,
birthday_bio DATE,
cspan_id REAL,
fec_id TEXT,
first_name TEXT,
gender_bio TEXT,
google_entity_id_id TEXT,
govtrack_id INTEGER,
house_history_id ... | 【DB_ID】 legislator
【Schema】
# Table: main.current
[
(ballotpedia_id:TEXT, Examples: [Sherrod Brown, Maria Cantwell, Ben Cardin]),
(bioguide_id:TEXT, Primary Key, Examples: [A000055, A000360, A000367]),
(birthday_bio:DATE, Examples: [1952-11-09]),
(cspan_id:REAL, Primary Key, Examples: [45516.0, 5.0, 1033767.0]),
(fec_i... | How many current legislators were born after the year 1960? | SELECT COUNT(bioguide_id) FROM current WHERE birthday_bio >= '1961-01-01' | born after the year 1960 refers to birthday_bio > '1960-01-01' |
legislator | CREATE TABLE current
(
ballotpedia_id TEXT,
bioguide_id TEXT,
birthday_bio DATE,
cspan_id REAL,
fec_id TEXT,
first_name TEXT,
gender_bio TEXT,
google_entity_id_id TEXT,
govtrack_id INTEGER,
house_history_id ... | 【DB_ID】 legislator
【Schema】
# Table: main.current
[
(ballotpedia_id:TEXT, Examples: [Sherrod Brown, Maria Cantwell, Ben Cardin]),
(bioguide_id:TEXT, Primary Key, Examples: [A000055, A000360, A000367]),
(birthday_bio:DATE, Examples: [1952-11-09]),
(cspan_id:REAL, Primary Key, Examples: [45516.0, 5.0, 1033767.0]),
(fec_i... | Among all the current female legislators, how many of them have not been registered in Federal Election Commission data? | SELECT COUNT(*) FROM current WHERE (fec_id IS NULL OR fec_id = '') AND gender_bio = 'F' | have not been registered refers to fec_id IS NULL; female refers to gender_bio = 'F' |
legislator | CREATE TABLE current
(
ballotpedia_id TEXT,
bioguide_id TEXT,
birthday_bio DATE,
cspan_id REAL,
fec_id TEXT,
first_name TEXT,
gender_bio TEXT,
google_entity_id_id TEXT,
govtrack_id INTEGER,
house_history_id ... | 【DB_ID】 legislator
【Schema】
# Table: main.current
[
(ballotpedia_id:TEXT, Examples: [Sherrod Brown, Maria Cantwell, Ben Cardin]),
(bioguide_id:TEXT, Primary Key, Examples: [A000055, A000360, A000367]),
(birthday_bio:DATE, Examples: [1952-11-09]),
(cspan_id:REAL, Primary Key, Examples: [45516.0, 5.0, 1033767.0]),
(fec_i... | What is the google entity ID of current legislator Sherrod Brown? | SELECT google_entity_id_id FROM current WHERE official_full_name = 'Sherrod Brown' | Sherrod Brown is an official_full_name |
legislator | CREATE TABLE current
(
ballotpedia_id TEXT,
bioguide_id TEXT,
birthday_bio DATE,
cspan_id REAL,
fec_id TEXT,
first_name TEXT,
gender_bio TEXT,
google_entity_id_id TEXT,
govtrack_id INTEGER,
house_history_id ... | 【DB_ID】 legislator
【Schema】
# Table: main.current
[
(ballotpedia_id:TEXT, Examples: [Sherrod Brown, Maria Cantwell, Ben Cardin]),
(bioguide_id:TEXT, Primary Key, Examples: [A000055, A000360, A000367]),
(birthday_bio:DATE, Examples: [1952-11-09]),
(cspan_id:REAL, Primary Key, Examples: [45516.0, 5.0, 1033767.0]),
(fec_i... | Which current legislator is older, Sherrod Brown or Maria Cantwell? | SELECT official_full_name FROM current WHERE official_full_name = 'Sherrod Brown' OR official_full_name = 'Maria Cantwell' ORDER BY birthday_bio LIMIT 1 | older refers to MAX(birthday_bio); 'Sherrod Brown' and 'Maria Cantwell' are official_full_name |
legislator | CREATE TABLE current
(
ballotpedia_id TEXT,
bioguide_id TEXT,
birthday_bio DATE,
cspan_id REAL,
fec_id TEXT,
first_name TEXT,
gender_bio TEXT,
google_entity_id_id TEXT,
govtrack_id INTEGER,
house_history_id ... | 【DB_ID】 legislator
【Schema】
# Table: main.current
[
(ballotpedia_id:TEXT, Examples: [Sherrod Brown, Maria Cantwell, Ben Cardin]),
(bioguide_id:TEXT, Primary Key, Examples: [A000055, A000360, A000367]),
(birthday_bio:DATE, Examples: [1952-11-09]),
(cspan_id:REAL, Primary Key, Examples: [45516.0, 5.0, 1033767.0]),
(fec_i... | What is the username of the current official Facebook presence of current legislator Todd Young? | SELECT T1.facebook FROM `social-media` AS T1 INNER JOIN current AS T2 ON T2.bioguide_id = T1.bioguide WHERE T2.official_full_name = 'Todd Young' | Todd Young is an official_full_name; username of current official Facebook presences refers to facebook; |
legislator | CREATE TABLE current
(
ballotpedia_id TEXT,
bioguide_id TEXT,
birthday_bio DATE,
cspan_id REAL,
fec_id TEXT,
first_name TEXT,
gender_bio TEXT,
google_entity_id_id TEXT,
govtrack_id INTEGER,
house_history_id ... | 【DB_ID】 legislator
【Schema】
# Table: main.current
[
(ballotpedia_id:TEXT, Examples: [Sherrod Brown, Maria Cantwell, Ben Cardin]),
(bioguide_id:TEXT, Primary Key, Examples: [A000055, A000360, A000367]),
(birthday_bio:DATE, Examples: [1952-11-09]),
(cspan_id:REAL, Primary Key, Examples: [45516.0, 5.0, 1033767.0]),
(fec_i... | How many current legislators do not have an account on instagram? | SELECT COUNT(*) FROM `social-media` AS T1 INNER JOIN current AS T2 ON T1.bioguide = T2.bioguide_id WHERE T1.instagram IS NULL | do not have an account on instagram refers to instagram is null |
legislator | CREATE TABLE current
(
ballotpedia_id TEXT,
bioguide_id TEXT,
birthday_bio DATE,
cspan_id REAL,
fec_id TEXT,
first_name TEXT,
gender_bio TEXT,
google_entity_id_id TEXT,
govtrack_id INTEGER,
house_history_id ... | 【DB_ID】 legislator
【Schema】
# Table: main.current
[
(ballotpedia_id:TEXT, Examples: [Sherrod Brown, Maria Cantwell, Ben Cardin]),
(bioguide_id:TEXT, Primary Key, Examples: [A000055, A000360, A000367]),
(birthday_bio:DATE, Examples: [1952-11-09]),
(cspan_id:REAL, Primary Key, Examples: [45516.0, 5.0, 1033767.0]),
(fec_i... | To which current legislator does twitter ID234128524 belong? Please give his or her full official name. | SELECT T1.official_full_name FROM current AS T1 INNER JOIN `social-media` AS T2 ON T2.bioguide = T1.bioguide_id WHERE T2.twitter_id = 234128524 | full official name refers to official_full_name |
legislator | CREATE TABLE current
(
ballotpedia_id TEXT,
bioguide_id TEXT,
birthday_bio DATE,
cspan_id REAL,
fec_id TEXT,
first_name TEXT,
gender_bio TEXT,
google_entity_id_id TEXT,
govtrack_id INTEGER,
house_history_id ... | 【DB_ID】 legislator
【Schema】
# Table: main.current
[
(ballotpedia_id:TEXT, Examples: [Sherrod Brown, Maria Cantwell, Ben Cardin]),
(bioguide_id:TEXT, Primary Key, Examples: [A000055, A000360, A000367]),
(birthday_bio:DATE, Examples: [1952-11-09]),
(cspan_id:REAL, Primary Key, Examples: [45516.0, 5.0, 1033767.0]),
(fec_i... | Please list the current official YouTube usernames of all the current female legislators. | SELECT T2.youtube FROM current AS T1 INNER JOIN `social-media` AS T2 ON T2.bioguide = T1.bioguide_id WHERE T1.gender_bio = 'F' | official YouTube usernames refers to youtube; female refers to gender_bio = 'F' |
legislator | CREATE TABLE current
(
ballotpedia_id TEXT,
bioguide_id TEXT,
birthday_bio DATE,
cspan_id REAL,
fec_id TEXT,
first_name TEXT,
gender_bio TEXT,
google_entity_id_id TEXT,
govtrack_id INTEGER,
house_history_id ... | 【DB_ID】 legislator
【Schema】
# Table: main.current
[
(ballotpedia_id:TEXT, Examples: [Sherrod Brown, Maria Cantwell, Ben Cardin]),
(bioguide_id:TEXT, Primary Key, Examples: [A000055, A000360, A000367]),
(birthday_bio:DATE, Examples: [1952-11-09]),
(cspan_id:REAL, Primary Key, Examples: [45516.0, 5.0, 1033767.0]),
(fec_i... | What is the username of the current official Facebook presence of the oldest current legislator? | SELECT T2.facebook FROM current AS T1 INNER JOIN `social-media` AS T2 ON T2.bioguide = T1.bioguide_id ORDER BY T1.birthday_bio LIMIT 1 | username of the official Facebook refers to facebook; the oldest refers to MAX(birthday_bio) |
legislator | CREATE TABLE current
(
ballotpedia_id TEXT,
bioguide_id TEXT,
birthday_bio DATE,
cspan_id REAL,
fec_id TEXT,
first_name TEXT,
gender_bio TEXT,
google_entity_id_id TEXT,
govtrack_id INTEGER,
house_history_id ... | 【DB_ID】 legislator
【Schema】
# Table: main.current
[
(ballotpedia_id:TEXT, Examples: [Sherrod Brown, Maria Cantwell, Ben Cardin]),
(bioguide_id:TEXT, Primary Key, Examples: [A000055, A000360, A000367]),
(birthday_bio:DATE, Examples: [1952-11-09]),
(cspan_id:REAL, Primary Key, Examples: [45516.0, 5.0, 1033767.0]),
(fec_i... | Among the current legislators who do not have accounts on OpenSecrets.org., how many of them do not have instagram accounts either? | SELECT SUM(CASE WHEN T1.instagram IS NULL THEN 1 ELSE 0 END) AS count FROM `social-media` AS T1 INNER JOIN current AS T2 ON T1.bioguide = T2.bioguide_id WHERE T2.opensecrets_id IS NULL OR T2.opensecrets_id = '' | do not have accounts on OpenSecrets.org refers to opensecrets_ID is NULL OR opensecrets_id = ''; do not have instagram accounts refers to instagram is null |
legislator | CREATE TABLE current
(
ballotpedia_id TEXT,
bioguide_id TEXT,
birthday_bio DATE,
cspan_id REAL,
fec_id TEXT,
first_name TEXT,
gender_bio TEXT,
google_entity_id_id TEXT,
govtrack_id INTEGER,
house_history_id ... | 【DB_ID】 legislator
【Schema】
# Table: main.current
[
(ballotpedia_id:TEXT, Examples: [Sherrod Brown, Maria Cantwell, Ben Cardin]),
(bioguide_id:TEXT, Primary Key, Examples: [A000055, A000360, A000367]),
(birthday_bio:DATE, Examples: [1952-11-09]),
(cspan_id:REAL, Primary Key, Examples: [45516.0, 5.0, 1033767.0]),
(fec_i... | Current legislator Roger F. Wicker has not been a representative for how many terms? | SELECT SUM(CASE WHEN T1.official_full_name = 'Roger F. Wicker' THEN 1 ELSE 0 END) AS count FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T2.district IS NULL OR T2.district = '' | Roger F. Wicker is an official_full_name; not a representative refers to district IS NULL OR district = '' |
legislator | CREATE TABLE current
(
ballotpedia_id TEXT,
bioguide_id TEXT,
birthday_bio DATE,
cspan_id REAL,
fec_id TEXT,
first_name TEXT,
gender_bio TEXT,
google_entity_id_id TEXT,
govtrack_id INTEGER,
house_history_id ... | 【DB_ID】 legislator
【Schema】
# Table: main.current
[
(ballotpedia_id:TEXT, Examples: [Sherrod Brown, Maria Cantwell, Ben Cardin]),
(bioguide_id:TEXT, Primary Key, Examples: [A000055, A000360, A000367]),
(birthday_bio:DATE, Examples: [1952-11-09]),
(cspan_id:REAL, Primary Key, Examples: [45516.0, 5.0, 1033767.0]),
(fec_i... | For how many terms has current legislator Sherrod Brown served? | SELECT COUNT(*) FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.official_full_name = 'Sherrod Brown' | Sherrod Brown is an official_full_name |
legislator | CREATE TABLE current
(
ballotpedia_id TEXT,
bioguide_id TEXT,
birthday_bio DATE,
cspan_id REAL,
fec_id TEXT,
first_name TEXT,
gender_bio TEXT,
google_entity_id_id TEXT,
govtrack_id INTEGER,
house_history_id ... | 【DB_ID】 legislator
【Schema】
# Table: main.current
[
(ballotpedia_id:TEXT, Examples: [Sherrod Brown, Maria Cantwell, Ben Cardin]),
(bioguide_id:TEXT, Primary Key, Examples: [A000055, A000360, A000367]),
(birthday_bio:DATE, Examples: [1952-11-09]),
(cspan_id:REAL, Primary Key, Examples: [45516.0, 5.0, 1033767.0]),
(fec_i... | Please list the official full names of all the current legislators who were once a senator during his or her terms. | SELECT T2.official_full_name FROM `current-terms` AS T1 INNER JOIN current AS T2 ON T2.bioguide_id = T1.bioguide WHERE T1.state_rank IS NOT NULL | once a senator during term refers to state_rank IS NOT NULL |
legislator | CREATE TABLE current
(
ballotpedia_id TEXT,
bioguide_id TEXT,
birthday_bio DATE,
cspan_id REAL,
fec_id TEXT,
first_name TEXT,
gender_bio TEXT,
google_entity_id_id TEXT,
govtrack_id INTEGER,
house_history_id ... | 【DB_ID】 legislator
【Schema】
# Table: main.current
[
(ballotpedia_id:TEXT, Examples: [Sherrod Brown, Maria Cantwell, Ben Cardin]),
(bioguide_id:TEXT, Primary Key, Examples: [A000055, A000360, A000367]),
(birthday_bio:DATE, Examples: [1952-11-09]),
(cspan_id:REAL, Primary Key, Examples: [45516.0, 5.0, 1033767.0]),
(fec_i... | For which state did current legislator Sherrod Brown serve during his term that started on 1993/1/5? | SELECT T1.state FROM `current-terms` AS T1 INNER JOIN current AS T2 ON T2.bioguide_id = T1.bioguide WHERE T1.start = '1993-01-05' AND T2.official_full_name = 'Sherrod Brown' | Sherrod Brown is an full official name; started on 1993/1/5 refers to start = '1993-01-05'; |
legislator | CREATE TABLE current
(
ballotpedia_id TEXT,
bioguide_id TEXT,
birthday_bio DATE,
cspan_id REAL,
fec_id TEXT,
first_name TEXT,
gender_bio TEXT,
google_entity_id_id TEXT,
govtrack_id INTEGER,
house_history_id ... | 【DB_ID】 legislator
【Schema】
# Table: main.current
[
(ballotpedia_id:TEXT, Examples: [Sherrod Brown, Maria Cantwell, Ben Cardin]),
(bioguide_id:TEXT, Primary Key, Examples: [A000055, A000360, A000367]),
(birthday_bio:DATE, Examples: [1952-11-09]),
(cspan_id:REAL, Primary Key, Examples: [45516.0, 5.0, 1033767.0]),
(fec_i... | Among all the female current legislators, how many of them have served for more than 4 terms? | SELECT COUNT(CID) FROM ( SELECT T1.bioguide_id AS CID FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.gender_bio = 'F' GROUP BY T2.bioguide HAVING COUNT(T2.bioguide) > 4 ) | female refers to gender_bio = 'F'; served for more than 4 terms refers to COUNT(bioguide > 4) |
legislator | CREATE TABLE current
(
ballotpedia_id TEXT,
bioguide_id TEXT,
birthday_bio DATE,
cspan_id REAL,
fec_id TEXT,
first_name TEXT,
gender_bio TEXT,
google_entity_id_id TEXT,
govtrack_id INTEGER,
house_history_id ... | 【DB_ID】 legislator
【Schema】
# Table: main.current
[
(ballotpedia_id:TEXT, Examples: [Sherrod Brown, Maria Cantwell, Ben Cardin]),
(bioguide_id:TEXT, Primary Key, Examples: [A000055, A000360, A000367]),
(birthday_bio:DATE, Examples: [1952-11-09]),
(cspan_id:REAL, Primary Key, Examples: [45516.0, 5.0, 1033767.0]),
(fec_i... | Among the current legislators who have served for more than 6 terms, how many of them were born after 1960? | SELECT COUNT(CID) FROM ( SELECT T1.bioguide_id AS CID FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.birthday_bio >= '1960-01-01' GROUP BY T2.bioguide HAVING COUNT(T2.bioguide) > 6 ) | served for more than 6 terms refers to COUNT(bioguide > 6); born after 1960 refers to birthday_bio > = '1960-01-01' |
legislator | CREATE TABLE current
(
ballotpedia_id TEXT,
bioguide_id TEXT,
birthday_bio DATE,
cspan_id REAL,
fec_id TEXT,
first_name TEXT,
gender_bio TEXT,
google_entity_id_id TEXT,
govtrack_id INTEGER,
house_history_id ... | 【DB_ID】 legislator
【Schema】
# Table: main.current
[
(ballotpedia_id:TEXT, Examples: [Sherrod Brown, Maria Cantwell, Ben Cardin]),
(bioguide_id:TEXT, Primary Key, Examples: [A000055, A000360, A000367]),
(birthday_bio:DATE, Examples: [1952-11-09]),
(cspan_id:REAL, Primary Key, Examples: [45516.0, 5.0, 1033767.0]),
(fec_i... | What is the average number of terms for a current female legislator? | SELECT CAST(COUNT(T2.bioguide) AS REAL) / COUNT(DISTINCT T1.bioguide_id) FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.gender_bio = 'F' | female refers to gender_bio = 'F'; calculation refers to DIVIDE(COUNT(bioguide WHERE gender_bio = 'F'), COUNT(bioguide_id)) |
legislator | CREATE TABLE current
(
ballotpedia_id TEXT,
bioguide_id TEXT,
birthday_bio DATE,
cspan_id REAL,
fec_id TEXT,
first_name TEXT,
gender_bio TEXT,
google_entity_id_id TEXT,
govtrack_id INTEGER,
house_history_id ... | 【DB_ID】 legislator
【Schema】
# Table: main.current
[
(ballotpedia_id:TEXT, Examples: [Sherrod Brown, Maria Cantwell, Ben Cardin]),
(bioguide_id:TEXT, Primary Key, Examples: [A000055, A000360, A000367]),
(birthday_bio:DATE, Examples: [1952-11-09]),
(cspan_id:REAL, Primary Key, Examples: [45516.0, 5.0, 1033767.0]),
(fec_i... | Among all the current legislators whose religion is Roman Catholic, what is the percentage of the ones without an instagram account? | SELECT CAST(SUM(CASE WHEN T1.instagram IS NULL THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM `social-media` AS T1 INNER JOIN current AS T2 ON T1.bioguide = T2.bioguide_id WHERE T2.religion_bio = 'Roman Catholic' | religion is Roman Catholic refers to religion_bio = 'Roman Catholic'; calculation = MULTIPLY(DIVIDE(COUNT(instagram is null), COUNT(bioguide_id)), 1.0) |
legislator | CREATE TABLE current
(
ballotpedia_id TEXT,
bioguide_id TEXT,
birthday_bio DATE,
cspan_id REAL,
fec_id TEXT,
first_name TEXT,
gender_bio TEXT,
google_entity_id_id TEXT,
govtrack_id INTEGER,
house_history_id ... | 【DB_ID】 legislator
【Schema】
# Table: main.current
[
(ballotpedia_id:TEXT, Examples: [Sherrod Brown, Maria Cantwell, Ben Cardin]),
(bioguide_id:TEXT, Primary Key, Examples: [A000055, A000360, A000367]),
(birthday_bio:DATE, Examples: [1952-11-09]),
(cspan_id:REAL, Primary Key, Examples: [45516.0, 5.0, 1033767.0]),
(fec_i... | How many males were members of the current legislators? | SELECT COUNT(*) FROM current WHERE gender_bio = 'M' | male refers to gender_bio = 'M' |
legislator | CREATE TABLE current
(
ballotpedia_id TEXT,
bioguide_id TEXT,
birthday_bio DATE,
cspan_id REAL,
fec_id TEXT,
first_name TEXT,
gender_bio TEXT,
google_entity_id_id TEXT,
govtrack_id INTEGER,
house_history_id ... | 【DB_ID】 legislator
【Schema】
# Table: main.current
[
(ballotpedia_id:TEXT, Examples: [Sherrod Brown, Maria Cantwell, Ben Cardin]),
(bioguide_id:TEXT, Primary Key, Examples: [A000055, A000360, A000367]),
(birthday_bio:DATE, Examples: [1952-11-09]),
(cspan_id:REAL, Primary Key, Examples: [45516.0, 5.0, 1033767.0]),
(fec_i... | How many current legislators chose Republican as their political party? | SELECT COUNT(*) FROM `current-terms` WHERE party = 'Republican' | chose Republican as their political party refers to party = 'Republican' |
legislator | CREATE TABLE current
(
ballotpedia_id TEXT,
bioguide_id TEXT,
birthday_bio DATE,
cspan_id REAL,
fec_id TEXT,
first_name TEXT,
gender_bio TEXT,
google_entity_id_id TEXT,
govtrack_id INTEGER,
house_history_id ... | 【DB_ID】 legislator
【Schema】
# Table: main.current
[
(ballotpedia_id:TEXT, Examples: [Sherrod Brown, Maria Cantwell, Ben Cardin]),
(bioguide_id:TEXT, Primary Key, Examples: [A000055, A000360, A000367]),
(birthday_bio:DATE, Examples: [1952-11-09]),
(cspan_id:REAL, Primary Key, Examples: [45516.0, 5.0, 1033767.0]),
(fec_i... | How many legislators have an Instagram account? | SELECT COUNT(*) FROM `social-media` WHERE instagram IS NOT NULL AND instagram <> '' | have an Instagram account refers to instagram is NOT null and instagram <>'' |
legislator | CREATE TABLE current
(
ballotpedia_id TEXT,
bioguide_id TEXT,
birthday_bio DATE,
cspan_id REAL,
fec_id TEXT,
first_name TEXT,
gender_bio TEXT,
google_entity_id_id TEXT,
govtrack_id INTEGER,
house_history_id ... | 【DB_ID】 legislator
【Schema】
# Table: main.current
[
(ballotpedia_id:TEXT, Examples: [Sherrod Brown, Maria Cantwell, Ben Cardin]),
(bioguide_id:TEXT, Primary Key, Examples: [A000055, A000360, A000367]),
(birthday_bio:DATE, Examples: [1952-11-09]),
(cspan_id:REAL, Primary Key, Examples: [45516.0, 5.0, 1033767.0]),
(fec_i... | How many females were members of the past legislators? | SELECT COUNT(*) FROM historical WHERE gender_bio = 'F' | female refers to gender_bio = 'F' |
legislator | CREATE TABLE current
(
ballotpedia_id TEXT,
bioguide_id TEXT,
birthday_bio DATE,
cspan_id REAL,
fec_id TEXT,
first_name TEXT,
gender_bio TEXT,
google_entity_id_id TEXT,
govtrack_id INTEGER,
house_history_id ... | 【DB_ID】 legislator
【Schema】
# Table: main.current
[
(ballotpedia_id:TEXT, Examples: [Sherrod Brown, Maria Cantwell, Ben Cardin]),
(bioguide_id:TEXT, Primary Key, Examples: [A000055, A000360, A000367]),
(birthday_bio:DATE, Examples: [1952-11-09]),
(cspan_id:REAL, Primary Key, Examples: [45516.0, 5.0, 1033767.0]),
(fec_i... | How many male legislators are Roman Catholic? | SELECT COUNT(*) FROM current WHERE religion_bio = 'Roman Catholic' AND gender_bio = 'M' | male refers to gender_bio = 'M'; Roman Catholic is a religion_bio |
legislator | CREATE TABLE current
(
ballotpedia_id TEXT,
bioguide_id TEXT,
birthday_bio DATE,
cspan_id REAL,
fec_id TEXT,
first_name TEXT,
gender_bio TEXT,
google_entity_id_id TEXT,
govtrack_id INTEGER,
house_history_id ... | 【DB_ID】 legislator
【Schema】
# Table: main.current
[
(ballotpedia_id:TEXT, Examples: [Sherrod Brown, Maria Cantwell, Ben Cardin]),
(bioguide_id:TEXT, Primary Key, Examples: [A000055, A000360, A000367]),
(birthday_bio:DATE, Examples: [1952-11-09]),
(cspan_id:REAL, Primary Key, Examples: [45516.0, 5.0, 1033767.0]),
(fec_i... | What type of political party Sherrod Brown has in 2005? | SELECT T1.party FROM `current-terms` AS T1 INNER JOIN current AS T2 ON T2.bioguide_id = T1.bioguide WHERE T2.first_name = 'Sherrod' AND T2.last_name = 'Brown' AND T1.start LIKE '%2005%' | political party refers to party; Sherrod Brown is an official_full_name; official_full_name refers to first_name, last_name; 2005 refers to start = 2005 |
legislator | CREATE TABLE current
(
ballotpedia_id TEXT,
bioguide_id TEXT,
birthday_bio DATE,
cspan_id REAL,
fec_id TEXT,
first_name TEXT,
gender_bio TEXT,
google_entity_id_id TEXT,
govtrack_id INTEGER,
house_history_id ... | 【DB_ID】 legislator
【Schema】
# Table: main.current
[
(ballotpedia_id:TEXT, Examples: [Sherrod Brown, Maria Cantwell, Ben Cardin]),
(bioguide_id:TEXT, Primary Key, Examples: [A000055, A000360, A000367]),
(birthday_bio:DATE, Examples: [1952-11-09]),
(cspan_id:REAL, Primary Key, Examples: [45516.0, 5.0, 1033767.0]),
(fec_i... | List the full name of all the senior senators in year 2013. | SELECT T2.official_full_name FROM `current-terms` AS T1 INNER JOIN current AS T2 ON T2.bioguide_id = T1.bioguide WHERE T1.state_rank = 'senior' AND T1.type = 'sen' AND T1.start LIKE '2013%' | full name refers to official_full_name; senior refers to state_rank = 'senior'; senators refers to type = 'sen'; 2013 refers to start LIKE '2013%' |
legislator | CREATE TABLE current
(
ballotpedia_id TEXT,
bioguide_id TEXT,
birthday_bio DATE,
cspan_id REAL,
fec_id TEXT,
first_name TEXT,
gender_bio TEXT,
google_entity_id_id TEXT,
govtrack_id INTEGER,
house_history_id ... | 【DB_ID】 legislator
【Schema】
# Table: main.current
[
(ballotpedia_id:TEXT, Examples: [Sherrod Brown, Maria Cantwell, Ben Cardin]),
(bioguide_id:TEXT, Primary Key, Examples: [A000055, A000360, A000367]),
(birthday_bio:DATE, Examples: [1952-11-09]),
(cspan_id:REAL, Primary Key, Examples: [45516.0, 5.0, 1033767.0]),
(fec_i... | What is the current official Youtube username of Chris Van Hollen? | SELECT T2.youtube FROM current AS T1 INNER JOIN `social-media` AS T2 ON T2.bioguide = T1.bioguide_id WHERE T1.official_full_name = 'Chris Van Hollen' | Youtube username refers to youtube; Chris Van Hollen is an official_full_name |
legislator | CREATE TABLE current
(
ballotpedia_id TEXT,
bioguide_id TEXT,
birthday_bio DATE,
cspan_id REAL,
fec_id TEXT,
first_name TEXT,
gender_bio TEXT,
google_entity_id_id TEXT,
govtrack_id INTEGER,
house_history_id ... | 【DB_ID】 legislator
【Schema】
# Table: main.current
[
(ballotpedia_id:TEXT, Examples: [Sherrod Brown, Maria Cantwell, Ben Cardin]),
(bioguide_id:TEXT, Primary Key, Examples: [A000055, A000360, A000367]),
(birthday_bio:DATE, Examples: [1952-11-09]),
(cspan_id:REAL, Primary Key, Examples: [45516.0, 5.0, 1033767.0]),
(fec_i... | How many official social media does Mark Warner have? | SELECT CASE WHEN T1.facebook IS NOT NULL THEN 1 END + CASE WHEN T1.instagram IS NOT NULL THEN 1 END + CASE WHEN T1.twitter IS NOT NULL THEN 1 END + CASE WHEN T1.youtube IS NOT NULL THEN 1 END AS COUNTSOCIAL FROM `social-media` AS T1 INNER JOIN current AS T2 ON T1.bioguide = T2.bioguide_id WHERE T2.first_name = 'Mark' A... | official social media refers to facebook is not null, instagram is not null, twitter is not null, youtube is not null; Mark Warner is an official_full_name; official_full_name refers to first_name, last_name |
legislator | CREATE TABLE current
(
ballotpedia_id TEXT,
bioguide_id TEXT,
birthday_bio DATE,
cspan_id REAL,
fec_id TEXT,
first_name TEXT,
gender_bio TEXT,
google_entity_id_id TEXT,
govtrack_id INTEGER,
house_history_id ... | 【DB_ID】 legislator
【Schema】
# Table: main.current
[
(ballotpedia_id:TEXT, Examples: [Sherrod Brown, Maria Cantwell, Ben Cardin]),
(bioguide_id:TEXT, Primary Key, Examples: [A000055, A000360, A000367]),
(birthday_bio:DATE, Examples: [1952-11-09]),
(cspan_id:REAL, Primary Key, Examples: [45516.0, 5.0, 1033767.0]),
(fec_i... | List the last name of all current legislators who live in California. | SELECT T1.last_name FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T2.state = 'CA' GROUP BY T1.last_name | California refers to state = 'CA' |
legislator | CREATE TABLE current
(
ballotpedia_id TEXT,
bioguide_id TEXT,
birthday_bio DATE,
cspan_id REAL,
fec_id TEXT,
first_name TEXT,
gender_bio TEXT,
google_entity_id_id TEXT,
govtrack_id INTEGER,
house_history_id ... | 【DB_ID】 legislator
【Schema】
# Table: main.current
[
(ballotpedia_id:TEXT, Examples: [Sherrod Brown, Maria Cantwell, Ben Cardin]),
(bioguide_id:TEXT, Primary Key, Examples: [A000055, A000360, A000367]),
(birthday_bio:DATE, Examples: [1952-11-09]),
(cspan_id:REAL, Primary Key, Examples: [45516.0, 5.0, 1033767.0]),
(fec_i... | List the full name of all current female senators. | SELECT T2.first_name, T2.last_name FROM `current-terms` AS T1 INNER JOIN current AS T2 ON T2.bioguide_id = T1.bioguide WHERE T1.type = 'sen' AND T2.gender_bio = 'F' GROUP BY T2.ballotpedia_id | full name refers to official_full_name; female refers to gender_bio = 'F'; senators refers to type = 'sen' |
legislator | CREATE TABLE current
(
ballotpedia_id TEXT,
bioguide_id TEXT,
birthday_bio DATE,
cspan_id REAL,
fec_id TEXT,
first_name TEXT,
gender_bio TEXT,
google_entity_id_id TEXT,
govtrack_id INTEGER,
house_history_id ... | 【DB_ID】 legislator
【Schema】
# Table: main.current
[
(ballotpedia_id:TEXT, Examples: [Sherrod Brown, Maria Cantwell, Ben Cardin]),
(bioguide_id:TEXT, Primary Key, Examples: [A000055, A000360, A000367]),
(birthday_bio:DATE, Examples: [1952-11-09]),
(cspan_id:REAL, Primary Key, Examples: [45516.0, 5.0, 1033767.0]),
(fec_i... | What is the numeric ID of Chris Van Hollen on GovTrack.us? | SELECT T2.govtrack FROM current AS T1 INNER JOIN `social-media` AS T2 ON T2.bioguide = T1.bioguide_id WHERE T1.official_full_name = 'Chris Van Hollen' | Chris Van Hollen is an official_full_name; numeric ID on GovTrack.us refers to govtrack |
legislator | CREATE TABLE current
(
ballotpedia_id TEXT,
bioguide_id TEXT,
birthday_bio DATE,
cspan_id REAL,
fec_id TEXT,
first_name TEXT,
gender_bio TEXT,
google_entity_id_id TEXT,
govtrack_id INTEGER,
house_history_id ... | 【DB_ID】 legislator
【Schema】
# Table: main.current
[
(ballotpedia_id:TEXT, Examples: [Sherrod Brown, Maria Cantwell, Ben Cardin]),
(bioguide_id:TEXT, Primary Key, Examples: [A000055, A000360, A000367]),
(birthday_bio:DATE, Examples: [1952-11-09]),
(cspan_id:REAL, Primary Key, Examples: [45516.0, 5.0, 1033767.0]),
(fec_i... | What is the current official Twitter handle of Roger F. Wicker? | SELECT T2.twitter FROM current AS T1 INNER JOIN `social-media` AS T2 ON T2.bioguide = T1.bioguide_id WHERE T1.official_full_name = 'Roger F. Wicker' | Twitter handle refers to twitter; Roger F. Wicker is an official_full_name |
legislator | CREATE TABLE current
(
ballotpedia_id TEXT,
bioguide_id TEXT,
birthday_bio DATE,
cspan_id REAL,
fec_id TEXT,
first_name TEXT,
gender_bio TEXT,
google_entity_id_id TEXT,
govtrack_id INTEGER,
house_history_id ... | 【DB_ID】 legislator
【Schema】
# Table: main.current
[
(ballotpedia_id:TEXT, Examples: [Sherrod Brown, Maria Cantwell, Ben Cardin]),
(bioguide_id:TEXT, Primary Key, Examples: [A000055, A000360, A000367]),
(birthday_bio:DATE, Examples: [1952-11-09]),
(cspan_id:REAL, Primary Key, Examples: [45516.0, 5.0, 1033767.0]),
(fec_i... | List the full name of all past legislators that chose Pro-Administration as their political party in year 1791. | SELECT T1.first_name, T1.last_name FROM historical AS T1 INNER JOIN `historical-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T2.party = 'Pro-Administration' AND CAST(T2.start AS DATE) <= 1791 AND CAST(T2.END AS DATE) >= 1791 | full name refers to official_full_name; chose Pro-Administration as their political party refers to party = 'Pro-Administration'; 1791 refers to start < = 1791 AND END > = 1791 |
legislator | CREATE TABLE current
(
ballotpedia_id TEXT,
bioguide_id TEXT,
birthday_bio DATE,
cspan_id REAL,
fec_id TEXT,
first_name TEXT,
gender_bio TEXT,
google_entity_id_id TEXT,
govtrack_id INTEGER,
house_history_id ... | 【DB_ID】 legislator
【Schema】
# Table: main.current
[
(ballotpedia_id:TEXT, Examples: [Sherrod Brown, Maria Cantwell, Ben Cardin]),
(bioguide_id:TEXT, Primary Key, Examples: [A000055, A000360, A000367]),
(birthday_bio:DATE, Examples: [1952-11-09]),
(cspan_id:REAL, Primary Key, Examples: [45516.0, 5.0, 1033767.0]),
(fec_i... | Provide the full name of all current female legislators that chose Republican as their political party. | SELECT T1.first_name, T1.last_name FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T2.party = 'Republican' AND T1.gender_bio = 'F' AND T2.END > DATE() GROUP BY T1.bioguide_id | full name refers to official_full_name; official_full_name refers to first_name, last_name; female refers to gender_bio = 'F'; chose Republican as their political party refers to party = 'Republican'; current legislators refers to END > Date() |
legislator | CREATE TABLE current
(
ballotpedia_id TEXT,
bioguide_id TEXT,
birthday_bio DATE,
cspan_id REAL,
fec_id TEXT,
first_name TEXT,
gender_bio TEXT,
google_entity_id_id TEXT,
govtrack_id INTEGER,
house_history_id ... | 【DB_ID】 legislator
【Schema】
# Table: main.current
[
(ballotpedia_id:TEXT, Examples: [Sherrod Brown, Maria Cantwell, Ben Cardin]),
(bioguide_id:TEXT, Primary Key, Examples: [A000055, A000360, A000367]),
(birthday_bio:DATE, Examples: [1952-11-09]),
(cspan_id:REAL, Primary Key, Examples: [45516.0, 5.0, 1033767.0]),
(fec_i... | What is the district number that Chris Van Hollen serving? | SELECT T2.district FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.official_full_name = 'Chris Van Hollen' AND T2.district IS NOT NULL GROUP BY T2.district | Chris Van Hollen is an official_full_name |
legislator | CREATE TABLE current
(
ballotpedia_id TEXT,
bioguide_id TEXT,
birthday_bio DATE,
cspan_id REAL,
fec_id TEXT,
first_name TEXT,
gender_bio TEXT,
google_entity_id_id TEXT,
govtrack_id INTEGER,
house_history_id ... | 【DB_ID】 legislator
【Schema】
# Table: main.current
[
(ballotpedia_id:TEXT, Examples: [Sherrod Brown, Maria Cantwell, Ben Cardin]),
(bioguide_id:TEXT, Primary Key, Examples: [A000055, A000360, A000367]),
(birthday_bio:DATE, Examples: [1952-11-09]),
(cspan_id:REAL, Primary Key, Examples: [45516.0, 5.0, 1033767.0]),
(fec_i... | How many times did Richard Durbin become a legislator in district 20? | SELECT SUM(CASE WHEN T2.district = 20 THEN 1 ELSE 0 END) AS count FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.first_name = 'Richard' AND T1.last_name = 'Durbin' | Richard Durbin is an official_full_name; official_full_name refers to first_name, last_name; district 20 refers to district = 20 |
legislator | CREATE TABLE current
(
ballotpedia_id TEXT,
bioguide_id TEXT,
birthday_bio DATE,
cspan_id REAL,
fec_id TEXT,
first_name TEXT,
gender_bio TEXT,
google_entity_id_id TEXT,
govtrack_id INTEGER,
house_history_id ... | 【DB_ID】 legislator
【Schema】
# Table: main.current
[
(ballotpedia_id:TEXT, Examples: [Sherrod Brown, Maria Cantwell, Ben Cardin]),
(bioguide_id:TEXT, Primary Key, Examples: [A000055, A000360, A000367]),
(birthday_bio:DATE, Examples: [1952-11-09]),
(cspan_id:REAL, Primary Key, Examples: [45516.0, 5.0, 1033767.0]),
(fec_i... | Calculate the average number of current male legislators who chose Democrat from 2000 until 2021. | SELECT CAST(COUNT(T1.bioguide_id) AS REAL) / 22 FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.gender_bio = 'M' AND CAST(T2.start AS DATE) >= 2000 AND CAST(T2.END AS DATE) <= 2021 AND T2.party = 'Democrat' | male refers to gender_bio = 'M'; legislators who chose Democrat refers to party = 'Democrat'; from 2000 until 2021 refers to start > = 2000 AND END < = 2021; calculation = DIVIDE(COUNT(bioguide_id), 22) |
legislator | CREATE TABLE current
(
ballotpedia_id TEXT,
bioguide_id TEXT,
birthday_bio DATE,
cspan_id REAL,
fec_id TEXT,
first_name TEXT,
gender_bio TEXT,
google_entity_id_id TEXT,
govtrack_id INTEGER,
house_history_id ... | 【DB_ID】 legislator
【Schema】
# Table: main.current
[
(ballotpedia_id:TEXT, Examples: [Sherrod Brown, Maria Cantwell, Ben Cardin]),
(bioguide_id:TEXT, Primary Key, Examples: [A000055, A000360, A000367]),
(birthday_bio:DATE, Examples: [1952-11-09]),
(cspan_id:REAL, Primary Key, Examples: [45516.0, 5.0, 1033767.0]),
(fec_i... | Calculate the percentage of the total number of current female legislators and past female legislators. State which one has the highest value. | SELECT CAST(COUNT(CASE WHEN current.gender_bio = 'F' THEN current.bioguide_id ELSE NULL END) AS REAL) * 100 / ( SELECT COUNT(CASE WHEN historical.gender_bio = 'F' THEN historical.bioguide_id ELSE NULL END) FROM historical ) FROM current | female refers to gender_bio = 'F'; calculation = MULTIPLY(DIVIDE(COUNT(current.gender_bio = 'F' THEN current.bioguide_id)), (COUNT(historical.gender_bio = 'F' then historical.bioguide_id)), 1.0); the highest value refers to MAX(calculation) |
legislator | CREATE TABLE current
(
ballotpedia_id TEXT,
bioguide_id TEXT,
birthday_bio DATE,
cspan_id REAL,
fec_id TEXT,
first_name TEXT,
gender_bio TEXT,
google_entity_id_id TEXT,
govtrack_id INTEGER,
house_history_id ... | 【DB_ID】 legislator
【Schema】
# Table: main.current
[
(ballotpedia_id:TEXT, Examples: [Sherrod Brown, Maria Cantwell, Ben Cardin]),
(bioguide_id:TEXT, Primary Key, Examples: [A000055, A000360, A000367]),
(birthday_bio:DATE, Examples: [1952-11-09]),
(cspan_id:REAL, Primary Key, Examples: [45516.0, 5.0, 1033767.0]),
(fec_i... | Give the YouTube ID of the channel 'RepWassermanSchultz.' | SELECT youtube_id FROM `social-media` WHERE youtube = 'RepWassermanSchultz' | RepWassermanSchultz refers to youtube |
legislator | CREATE TABLE current
(
ballotpedia_id TEXT,
bioguide_id TEXT,
birthday_bio DATE,
cspan_id REAL,
fec_id TEXT,
first_name TEXT,
gender_bio TEXT,
google_entity_id_id TEXT,
govtrack_id INTEGER,
house_history_id ... | 【DB_ID】 legislator
【Schema】
# Table: main.current
[
(ballotpedia_id:TEXT, Examples: [Sherrod Brown, Maria Cantwell, Ben Cardin]),
(bioguide_id:TEXT, Primary Key, Examples: [A000055, A000360, A000367]),
(birthday_bio:DATE, Examples: [1952-11-09]),
(cspan_id:REAL, Primary Key, Examples: [45516.0, 5.0, 1033767.0]),
(fec_i... | What are the Facebook, Twitter and YouTube usernames of Adam Kinzinger? | SELECT T2.facebook FROM current AS T1 INNER JOIN `social-media` AS T2 ON T2.bioguide = T1.bioguide_id WHERE T1.official_full_name = 'Adam Kinzinger' | Facebook, Twitter and YouTube usernames refers to facebook, twitter, youtube; Adam Kinzinger is an official_full_name |
legislator | CREATE TABLE current
(
ballotpedia_id TEXT,
bioguide_id TEXT,
birthday_bio DATE,
cspan_id REAL,
fec_id TEXT,
first_name TEXT,
gender_bio TEXT,
google_entity_id_id TEXT,
govtrack_id INTEGER,
house_history_id ... | 【DB_ID】 legislator
【Schema】
# Table: main.current
[
(ballotpedia_id:TEXT, Examples: [Sherrod Brown, Maria Cantwell, Ben Cardin]),
(bioguide_id:TEXT, Primary Key, Examples: [A000055, A000360, A000367]),
(birthday_bio:DATE, Examples: [1952-11-09]),
(cspan_id:REAL, Primary Key, Examples: [45516.0, 5.0, 1033767.0]),
(fec_i... | Which party does Christopher Henderson Clark belong to? | SELECT T1.party FROM `historical-terms` AS T1 INNER JOIN historical AS T2 ON T2.bioguide_id = T1.bioguide WHERE T2.first_name OR T2.middle_name OR T2.last_name = 'ChristopherHendersonClark' | Christopher Henderson Clark is full name; full name refers to first_name, middle_name, last_name |
legislator | CREATE TABLE current
(
ballotpedia_id TEXT,
bioguide_id TEXT,
birthday_bio DATE,
cspan_id REAL,
fec_id TEXT,
first_name TEXT,
gender_bio TEXT,
google_entity_id_id TEXT,
govtrack_id INTEGER,
house_history_id ... | 【DB_ID】 legislator
【Schema】
# Table: main.current
[
(ballotpedia_id:TEXT, Examples: [Sherrod Brown, Maria Cantwell, Ben Cardin]),
(bioguide_id:TEXT, Primary Key, Examples: [A000055, A000360, A000367]),
(birthday_bio:DATE, Examples: [1952-11-09]),
(cspan_id:REAL, Primary Key, Examples: [45516.0, 5.0, 1033767.0]),
(fec_i... | List the official full names of 10 legislators who have a YouTube account but no Instagram account. | SELECT T2.official_full_name FROM `social-media` AS T1 INNER JOIN current AS T2 ON T1.bioguide = T2.bioguide_id WHERE T1.facebook IS NOT NULL AND (T1.instagram IS NULL OR T1.instagram = '') LIMIT 10 | have a YouTube account but no Instagram account refers to facebook is not null and (instagram is null or instagram = '') |
legislator | CREATE TABLE current
(
ballotpedia_id TEXT,
bioguide_id TEXT,
birthday_bio DATE,
cspan_id REAL,
fec_id TEXT,
first_name TEXT,
gender_bio TEXT,
google_entity_id_id TEXT,
govtrack_id INTEGER,
house_history_id ... | 【DB_ID】 legislator
【Schema】
# Table: main.current
[
(ballotpedia_id:TEXT, Examples: [Sherrod Brown, Maria Cantwell, Ben Cardin]),
(bioguide_id:TEXT, Primary Key, Examples: [A000055, A000360, A000367]),
(birthday_bio:DATE, Examples: [1952-11-09]),
(cspan_id:REAL, Primary Key, Examples: [45516.0, 5.0, 1033767.0]),
(fec_i... | Give the official full names of legislators representing Virginia. | SELECT T1.official_full_name FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T2.state = 'VA' GROUP BY T1.official_full_name | Virginia refers to state = 'VA' |
legislator | CREATE TABLE current
(
ballotpedia_id TEXT,
bioguide_id TEXT,
birthday_bio DATE,
cspan_id REAL,
fec_id TEXT,
first_name TEXT,
gender_bio TEXT,
google_entity_id_id TEXT,
govtrack_id INTEGER,
house_history_id ... | 【DB_ID】 legislator
【Schema】
# Table: main.current
[
(ballotpedia_id:TEXT, Examples: [Sherrod Brown, Maria Cantwell, Ben Cardin]),
(bioguide_id:TEXT, Primary Key, Examples: [A000055, A000360, A000367]),
(birthday_bio:DATE, Examples: [1952-11-09]),
(cspan_id:REAL, Primary Key, Examples: [45516.0, 5.0, 1033767.0]),
(fec_i... | Which historical legislators are members of the National Greenbacker party? Write their first and last names. | SELECT T2.first_name, T2.last_name FROM `historical-terms` AS T1 INNER JOIN historical AS T2 ON T2.bioguide_id = T1.bioguide WHERE T1.party = 'National Greenbacker' | members of the National Greenbacker party refers to party = 'National Greenbacker'; first and last names refers to first_name, last_name |
legislator | CREATE TABLE current
(
ballotpedia_id TEXT,
bioguide_id TEXT,
birthday_bio DATE,
cspan_id REAL,
fec_id TEXT,
first_name TEXT,
gender_bio TEXT,
google_entity_id_id TEXT,
govtrack_id INTEGER,
house_history_id ... | 【DB_ID】 legislator
【Schema】
# Table: main.current
[
(ballotpedia_id:TEXT, Examples: [Sherrod Brown, Maria Cantwell, Ben Cardin]),
(bioguide_id:TEXT, Primary Key, Examples: [A000055, A000360, A000367]),
(birthday_bio:DATE, Examples: [1952-11-09]),
(cspan_id:REAL, Primary Key, Examples: [45516.0, 5.0, 1033767.0]),
(fec_i... | Which legislator has the YouTube channel 'RoskamIL06?' Write the official full name. | SELECT T1.official_full_name FROM current AS T1 INNER JOIN `social-media` AS T2 ON T2.bioguide = T1.bioguide_id WHERE T2.youtube = 'RoskamIL06' | YouTube channel 'RoskamIL06' refers to youtube = 'RoskamIL06'; |
legislator | CREATE TABLE current
(
ballotpedia_id TEXT,
bioguide_id TEXT,
birthday_bio DATE,
cspan_id REAL,
fec_id TEXT,
first_name TEXT,
gender_bio TEXT,
google_entity_id_id TEXT,
govtrack_id INTEGER,
house_history_id ... | 【DB_ID】 legislator
【Schema】
# Table: main.current
[
(ballotpedia_id:TEXT, Examples: [Sherrod Brown, Maria Cantwell, Ben Cardin]),
(bioguide_id:TEXT, Primary Key, Examples: [A000055, A000360, A000367]),
(birthday_bio:DATE, Examples: [1952-11-09]),
(cspan_id:REAL, Primary Key, Examples: [45516.0, 5.0, 1033767.0]),
(fec_i... | List the full names of 10 legislators who only have a Facebook account. | SELECT T2.official_full_name FROM `social-media` AS T1 INNER JOIN current AS T2 ON T1.bioguide = T2.bioguide_id WHERE (T1.youtube IS NULL OR T1.youtube = '') AND (T1.instagram IS NULL OR T1.instagram = '') AND (T1.twitter IS NULL OR T1.twitter = '') AND T1.facebook IS NOT NULL AND T1.facebook != '' | full names refers to official_full_name; only have a Facebook account refers to youtube is NULL or youtube = '', instagram is NULL or instagram = '', twitter is NULL or twitter = '', facebook is not NULL and facebook = '' |
legislator | CREATE TABLE current
(
ballotpedia_id TEXT,
bioguide_id TEXT,
birthday_bio DATE,
cspan_id REAL,
fec_id TEXT,
first_name TEXT,
gender_bio TEXT,
google_entity_id_id TEXT,
govtrack_id INTEGER,
house_history_id ... | 【DB_ID】 legislator
【Schema】
# Table: main.current
[
(ballotpedia_id:TEXT, Examples: [Sherrod Brown, Maria Cantwell, Ben Cardin]),
(bioguide_id:TEXT, Primary Key, Examples: [A000055, A000360, A000367]),
(birthday_bio:DATE, Examples: [1952-11-09]),
(cspan_id:REAL, Primary Key, Examples: [45516.0, 5.0, 1033767.0]),
(fec_i... | Write the full names of junior ranked Republicans. | SELECT T1.official_full_name FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T2.party = 'Republican' AND T2.state_rank = 'junior' GROUP BY T1.official_full_name | full name refers to official_full_name; junior refers to state_rank = 'junior'; Republicans refers to party = 'Republican' |
legislator | CREATE TABLE current
(
ballotpedia_id TEXT,
bioguide_id TEXT,
birthday_bio DATE,
cspan_id REAL,
fec_id TEXT,
first_name TEXT,
gender_bio TEXT,
google_entity_id_id TEXT,
govtrack_id INTEGER,
house_history_id ... | 【DB_ID】 legislator
【Schema】
# Table: main.current
[
(ballotpedia_id:TEXT, Examples: [Sherrod Brown, Maria Cantwell, Ben Cardin]),
(bioguide_id:TEXT, Primary Key, Examples: [A000055, A000360, A000367]),
(birthday_bio:DATE, Examples: [1952-11-09]),
(cspan_id:REAL, Primary Key, Examples: [45516.0, 5.0, 1033767.0]),
(fec_i... | What is the contact URL of Claire McCaskill? | SELECT T2.contact_form FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.official_full_name = 'Claire McCaskill' GROUP BY T2.contact_form | contact URL refers to contact_form; Claire McCaskill is an official_full_name |
legislator | CREATE TABLE current
(
ballotpedia_id TEXT,
bioguide_id TEXT,
birthday_bio DATE,
cspan_id REAL,
fec_id TEXT,
first_name TEXT,
gender_bio TEXT,
google_entity_id_id TEXT,
govtrack_id INTEGER,
house_history_id ... | 【DB_ID】 legislator
【Schema】
# Table: main.current
[
(ballotpedia_id:TEXT, Examples: [Sherrod Brown, Maria Cantwell, Ben Cardin]),
(bioguide_id:TEXT, Primary Key, Examples: [A000055, A000360, A000367]),
(birthday_bio:DATE, Examples: [1952-11-09]),
(cspan_id:REAL, Primary Key, Examples: [45516.0, 5.0, 1033767.0]),
(fec_i... | Give the Wikipedia IDs of historical legislators who are Readjuster Democrats. | SELECT T2.wikipedia_id FROM `historical-terms` AS T1 INNER JOIN historical AS T2 ON T2.bioguide_id = T1.bioguide WHERE T1.party = 'Readjuster Democrat' | Readjuster Democrats refers to party = 'Readjuster Democrat' |
legislator | CREATE TABLE current
(
ballotpedia_id TEXT,
bioguide_id TEXT,
birthday_bio DATE,
cspan_id REAL,
fec_id TEXT,
first_name TEXT,
gender_bio TEXT,
google_entity_id_id TEXT,
govtrack_id INTEGER,
house_history_id ... | 【DB_ID】 legislator
【Schema】
# Table: main.current
[
(ballotpedia_id:TEXT, Examples: [Sherrod Brown, Maria Cantwell, Ben Cardin]),
(bioguide_id:TEXT, Primary Key, Examples: [A000055, A000360, A000367]),
(birthday_bio:DATE, Examples: [1952-11-09]),
(cspan_id:REAL, Primary Key, Examples: [45516.0, 5.0, 1033767.0]),
(fec_i... | List the full names of Republican legislators who have a nickname. | SELECT T1.official_full_name FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T2.party = 'Republican' AND T1.nickname_name IS NOT NULL GROUP BY T1.official_full_name | full names refers to official_full_name; Republican refers to party = 'Republican'; nickname refers to nickname_name |
legislator | CREATE TABLE current
(
ballotpedia_id TEXT,
bioguide_id TEXT,
birthday_bio DATE,
cspan_id REAL,
fec_id TEXT,
first_name TEXT,
gender_bio TEXT,
google_entity_id_id TEXT,
govtrack_id INTEGER,
house_history_id ... | 【DB_ID】 legislator
【Schema】
# Table: main.current
[
(ballotpedia_id:TEXT, Examples: [Sherrod Brown, Maria Cantwell, Ben Cardin]),
(bioguide_id:TEXT, Primary Key, Examples: [A000055, A000360, A000367]),
(birthday_bio:DATE, Examples: [1952-11-09]),
(cspan_id:REAL, Primary Key, Examples: [45516.0, 5.0, 1033767.0]),
(fec_i... | Which state did Veronica Grace Boland represent and which party is she affiliated? | SELECT T2.state, T2.party FROM historical AS T1 INNER JOIN `historical-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.first_name OR T1.middle_name OR T1.last_name = 'VeronicaGraceBoland' | Veronica Grace Boland is a full name; full name refers to first_name, middle_name, last_name; party affiliated refers to party |
legislator | CREATE TABLE current
(
ballotpedia_id TEXT,
bioguide_id TEXT,
birthday_bio DATE,
cspan_id REAL,
fec_id TEXT,
first_name TEXT,
gender_bio TEXT,
google_entity_id_id TEXT,
govtrack_id INTEGER,
house_history_id ... | 【DB_ID】 legislator
【Schema】
# Table: main.current
[
(ballotpedia_id:TEXT, Examples: [Sherrod Brown, Maria Cantwell, Ben Cardin]),
(bioguide_id:TEXT, Primary Key, Examples: [A000055, A000360, A000367]),
(birthday_bio:DATE, Examples: [1952-11-09]),
(cspan_id:REAL, Primary Key, Examples: [45516.0, 5.0, 1033767.0]),
(fec_i... | How many historical legislators were born in 1973? | SELECT COUNT(*) FROM historical WHERE CAST(birthday_bio AS date) = 1973 | born in 1973 refers to birthday_bio = 1973 |
legislator | CREATE TABLE current
(
ballotpedia_id TEXT,
bioguide_id TEXT,
birthday_bio DATE,
cspan_id REAL,
fec_id TEXT,
first_name TEXT,
gender_bio TEXT,
google_entity_id_id TEXT,
govtrack_id INTEGER,
house_history_id ... | 【DB_ID】 legislator
【Schema】
# Table: main.current
[
(ballotpedia_id:TEXT, Examples: [Sherrod Brown, Maria Cantwell, Ben Cardin]),
(bioguide_id:TEXT, Primary Key, Examples: [A000055, A000360, A000367]),
(birthday_bio:DATE, Examples: [1952-11-09]),
(cspan_id:REAL, Primary Key, Examples: [45516.0, 5.0, 1033767.0]),
(fec_i... | What is the ratio of males and females among historical legislators? | SELECT CAST(SUM(CASE WHEN gender_bio = 'M' THEN 1 ELSE 0 END) AS REAL) / SUM(CASE WHEN gender_bio = 'F' THEN 1 ELSE 0 END) FROM historical | male refers to gender_bio = 'M'; female refers to gender_bio = 'F'; calculation = DIVIDE(COUNT(gender_bio = 'M' THEN bioguide_id), COUNT(gender_bio = 'F' THEN bioguide_id)) |
legislator | CREATE TABLE current
(
ballotpedia_id TEXT,
bioguide_id TEXT,
birthday_bio DATE,
cspan_id REAL,
fec_id TEXT,
first_name TEXT,
gender_bio TEXT,
google_entity_id_id TEXT,
govtrack_id INTEGER,
house_history_id ... | 【DB_ID】 legislator
【Schema】
# Table: main.current
[
(ballotpedia_id:TEXT, Examples: [Sherrod Brown, Maria Cantwell, Ben Cardin]),
(bioguide_id:TEXT, Primary Key, Examples: [A000055, A000360, A000367]),
(birthday_bio:DATE, Examples: [1952-11-09]),
(cspan_id:REAL, Primary Key, Examples: [45516.0, 5.0, 1033767.0]),
(fec_i... | Among the legislators who will end in 2009, how many are from the Republican party? | SELECT `END`, party FROM `current-terms` WHERE STRFTIME('%Y', `END`) = '2009' AND party = 'Republican' | the legislators who will end in 2009 refers to END 2009; from the Republican party refers to party = 'Republican' |
legislator | CREATE TABLE current
(
ballotpedia_id TEXT,
bioguide_id TEXT,
birthday_bio DATE,
cspan_id REAL,
fec_id TEXT,
first_name TEXT,
gender_bio TEXT,
google_entity_id_id TEXT,
govtrack_id INTEGER,
house_history_id ... | 【DB_ID】 legislator
【Schema】
# Table: main.current
[
(ballotpedia_id:TEXT, Examples: [Sherrod Brown, Maria Cantwell, Ben Cardin]),
(bioguide_id:TEXT, Primary Key, Examples: [A000055, A000360, A000367]),
(birthday_bio:DATE, Examples: [1952-11-09]),
(cspan_id:REAL, Primary Key, Examples: [45516.0, 5.0, 1033767.0]),
(fec_i... | List the official full names and genders of legislators who have Collins as their last name. | SELECT official_full_name, gender_bio FROM current WHERE last_name = 'Collins' | genders refers to gender_bio; Collins is a last_name |
legislator | CREATE TABLE current
(
ballotpedia_id TEXT,
bioguide_id TEXT,
birthday_bio DATE,
cspan_id REAL,
fec_id TEXT,
first_name TEXT,
gender_bio TEXT,
google_entity_id_id TEXT,
govtrack_id INTEGER,
house_history_id ... | 【DB_ID】 legislator
【Schema】
# Table: main.current
[
(ballotpedia_id:TEXT, Examples: [Sherrod Brown, Maria Cantwell, Ben Cardin]),
(bioguide_id:TEXT, Primary Key, Examples: [A000055, A000360, A000367]),
(birthday_bio:DATE, Examples: [1952-11-09]),
(cspan_id:REAL, Primary Key, Examples: [45516.0, 5.0, 1033767.0]),
(fec_i... | How many percent of senators were from class 1? | SELECT CAST(SUM(CASE WHEN class = 1 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM `historical-terms` WHERE type = 'sen' | senator refers to type = 'sen'; class 1 refers to class = 1; calculation = MULTIPLY(DIVIDE(COUNT(class = 1 then bioguide), COUNT(bioguide)), 1.0) |
legislator | CREATE TABLE current
(
ballotpedia_id TEXT,
bioguide_id TEXT,
birthday_bio DATE,
cspan_id REAL,
fec_id TEXT,
first_name TEXT,
gender_bio TEXT,
google_entity_id_id TEXT,
govtrack_id INTEGER,
house_history_id ... | 【DB_ID】 legislator
【Schema】
# Table: main.current
[
(ballotpedia_id:TEXT, Examples: [Sherrod Brown, Maria Cantwell, Ben Cardin]),
(bioguide_id:TEXT, Primary Key, Examples: [A000055, A000360, A000367]),
(birthday_bio:DATE, Examples: [1952-11-09]),
(cspan_id:REAL, Primary Key, Examples: [45516.0, 5.0, 1033767.0]),
(fec_i... | Provide the current legislators' official full names who are from the Independent party. | SELECT T1.official_full_name FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T2.party = 'Independent' GROUP BY T1.official_full_name | Independent party refers to party = 'Independent' |
legislator | CREATE TABLE current
(
ballotpedia_id TEXT,
bioguide_id TEXT,
birthday_bio DATE,
cspan_id REAL,
fec_id TEXT,
first_name TEXT,
gender_bio TEXT,
google_entity_id_id TEXT,
govtrack_id INTEGER,
house_history_id ... | 【DB_ID】 legislator
【Schema】
# Table: main.current
[
(ballotpedia_id:TEXT, Examples: [Sherrod Brown, Maria Cantwell, Ben Cardin]),
(bioguide_id:TEXT, Primary Key, Examples: [A000055, A000360, A000367]),
(birthday_bio:DATE, Examples: [1952-11-09]),
(cspan_id:REAL, Primary Key, Examples: [45516.0, 5.0, 1033767.0]),
(fec_i... | How many years had Jr. John Conyers served in total? | SELECT SUM(CAST(T2.END - T2.start AS DATE)) AS sum FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.official_full_name = 'John Conyers, Jr.' | Jr. John Conyers is an official_full_name; years served refers to SUM(SUBTRACT(END, start)) |
legislator | CREATE TABLE current
(
ballotpedia_id TEXT,
bioguide_id TEXT,
birthday_bio DATE,
cspan_id REAL,
fec_id TEXT,
first_name TEXT,
gender_bio TEXT,
google_entity_id_id TEXT,
govtrack_id INTEGER,
house_history_id ... | 【DB_ID】 legislator
【Schema】
# Table: main.current
[
(ballotpedia_id:TEXT, Examples: [Sherrod Brown, Maria Cantwell, Ben Cardin]),
(bioguide_id:TEXT, Primary Key, Examples: [A000055, A000360, A000367]),
(birthday_bio:DATE, Examples: [1952-11-09]),
(cspan_id:REAL, Primary Key, Examples: [45516.0, 5.0, 1033767.0]),
(fec_i... | How old was Jr. F. James Sensenbrenner when he first started as a legislator? | SELECT CAST(MIN(T2.start) - T1.birthday_bio AS DATE) AS AGE FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.official_full_name = 'F. James Sensenbrenner, Jr.' | Jr. F. James Sensenbrenner is an official_full_name; How old refers to SUBTRACT(MIN(start), birthday_bio) |
legislator | CREATE TABLE current
(
ballotpedia_id TEXT,
bioguide_id TEXT,
birthday_bio DATE,
cspan_id REAL,
fec_id TEXT,
first_name TEXT,
gender_bio TEXT,
google_entity_id_id TEXT,
govtrack_id INTEGER,
house_history_id ... | 【DB_ID】 legislator
【Schema】
# Table: main.current
[
(ballotpedia_id:TEXT, Examples: [Sherrod Brown, Maria Cantwell, Ben Cardin]),
(bioguide_id:TEXT, Primary Key, Examples: [A000055, A000360, A000367]),
(birthday_bio:DATE, Examples: [1952-11-09]),
(cspan_id:REAL, Primary Key, Examples: [45516.0, 5.0, 1033767.0]),
(fec_i... | List the full names, religions, and parties of legislators who have served in Maine. | SELECT T1.official_full_name, T2.relation, T2.party FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T2.state = 'ME' GROUP BY T1.official_full_name, T2.relation, T2.party | full names refers to official_full_name; religion refers to religion_bio; Maine refers to state = "ME" |
legislator | CREATE TABLE current
(
ballotpedia_id TEXT,
bioguide_id TEXT,
birthday_bio DATE,
cspan_id REAL,
fec_id TEXT,
first_name TEXT,
gender_bio TEXT,
google_entity_id_id TEXT,
govtrack_id INTEGER,
house_history_id ... | 【DB_ID】 legislator
【Schema】
# Table: main.current
[
(ballotpedia_id:TEXT, Examples: [Sherrod Brown, Maria Cantwell, Ben Cardin]),
(bioguide_id:TEXT, Primary Key, Examples: [A000055, A000360, A000367]),
(birthday_bio:DATE, Examples: [1952-11-09]),
(cspan_id:REAL, Primary Key, Examples: [45516.0, 5.0, 1033767.0]),
(fec_i... | Among legislators who have an Instagram account, list down their full names and nicknames who have a Thomas ID of less than 1000. | SELECT T1.official_full_name, T1.nickname_name FROM current AS T1 INNER JOIN `social-media` AS T2 ON T2.bioguide = T1.bioguide_id WHERE T2.instagram IS NOT NULL AND T1.thomas_id < 1000 | have an Instagram account refers to instagram is not null; full names refers to official_full_name; nicknames refers to nickname_name; Thomas ID of less than 1000 refers to thomas_id < 1000; |
legislator | CREATE TABLE current
(
ballotpedia_id TEXT,
bioguide_id TEXT,
birthday_bio DATE,
cspan_id REAL,
fec_id TEXT,
first_name TEXT,
gender_bio TEXT,
google_entity_id_id TEXT,
govtrack_id INTEGER,
house_history_id ... | 【DB_ID】 legislator
【Schema】
# Table: main.current
[
(ballotpedia_id:TEXT, Examples: [Sherrod Brown, Maria Cantwell, Ben Cardin]),
(bioguide_id:TEXT, Primary Key, Examples: [A000055, A000360, A000367]),
(birthday_bio:DATE, Examples: [1952-11-09]),
(cspan_id:REAL, Primary Key, Examples: [45516.0, 5.0, 1033767.0]),
(fec_i... | When was the last serving date of Matt Salmon? | SELECT T1.END FROM `historical-terms` AS T1 INNER JOIN historical AS T2 ON T2.bioguide_id = T1.bioguide WHERE T2.official_full_name = 'Matt Salmon' | Matt Salmon is an official_full_name |
legislator | CREATE TABLE current
(
ballotpedia_id TEXT,
bioguide_id TEXT,
birthday_bio DATE,
cspan_id REAL,
fec_id TEXT,
first_name TEXT,
gender_bio TEXT,
google_entity_id_id TEXT,
govtrack_id INTEGER,
house_history_id ... | 【DB_ID】 legislator
【Schema】
# Table: main.current
[
(ballotpedia_id:TEXT, Examples: [Sherrod Brown, Maria Cantwell, Ben Cardin]),
(bioguide_id:TEXT, Primary Key, Examples: [A000055, A000360, A000367]),
(birthday_bio:DATE, Examples: [1952-11-09]),
(cspan_id:REAL, Primary Key, Examples: [45516.0, 5.0, 1033767.0]),
(fec_i... | Among the legislators who have served in the U.S. House, provide the party and the state of the legislators who were born in 1738. | SELECT T1.party, T1.state FROM `historical-terms` AS T1 INNER JOIN historical AS T2 ON T2.bioguide_id = T1.bioguide WHERE T2.house_history_id IS NOT NULL AND T2.birthday_bio LIKE '%1738%' | have served in the U.S. House refers to house_history_id IS NOT NULL; born in 1738 refers to birthday_bio = 1738 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.