db_id
stringlengths
4
31
SQL
stringlengths
18
1.45k
input_sequence
stringlengths
148
11k
question
stringlengths
16
325
public_review_platform
select count(business_id) from business where city = 'mesa' and active = 'true'
Question: how many businesses are not closed in the city of mesa? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> attribute_id, business_id, a...
how many businesses are not closed in the city of mesa?
public_review_platform
select count(business_id) from business where stars in (1, 2)
Question: in how many businesses have customers had a bad or terrible experience? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> attribute_id...
in how many businesses have customers had a bad or terrible experience?
public_review_platform
select business_id from business where stars > 3 and city = 'paradise valley' and review_count = 'low'
Question: list by id the businesses with the reviews with the lowest veracity of paradise valley. | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes...
list by id the businesses with the reviews with the lowest veracity of paradise valley.
public_review_platform
select count(business_id) from business_attributes where attribute_value > 1
Question: how many businesses have more than 1 attribute? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> attribute_id, business_id, attribute...
how many businesses have more than 1 attribute?
public_review_platform
select count(business_id) from business_hours where opening_time = '8am' and closing_time = '6pm'
Question: how many businesses are opened the same number of hours every day of the week? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> attri...
how many businesses are opened the same number of hours every day of the week?
public_review_platform
select count(t1.business_id) from business as t1 inner join reviews as t2 on t1.business_id = t2.business_id where t2.review_votes_funny = 'uber' and t1.active = 'true'
Question: how many reviews of businesses that are still open received an uber rating on the funny vote? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attr...
how many reviews of businesses that are still open received an uber rating on the funny vote?
public_review_platform
select count(t2.user_id) from users_compliments as t1 inner join users as t2 on t1.user_id = t2.user_id where t1.number_of_compliments = 'high' and t2.user_fans = 'none'
Question: how many of the users who use a high number of compliments do not have any fans? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> att...
how many of the users who use a high number of compliments do not have any fans?
public_review_platform
select t2.compliment_type from users_compliments as t1 inner join compliments as t2 on t1.compliment_id = t2.compliment_id group by t2.compliment_type order by count(t2.compliment_type) desc limit 1
Question: what is the most common type of compliments that a user has received from other users? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes ...
what is the most common type of compliments that a user has received from other users?
public_review_platform
select t2.user_average_stars from tips as t1 inner join users as t2 on t1.user_id = t2.user_id group by t2.user_id order by sum(t1.likes) desc limit 3
Question: how many stars does each of the 3 top users with the most likes in their reviews have? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes ...
how many stars does each of the 3 top users with the most likes in their reviews have?
public_review_platform
select t1.category_name from categories as t1 inner join business_categories as t2 on t1.category_id = t2.category_id inner join business as t3 on t2.business_id = t3.business_id where t3.city = 'arcadia'
Question: in which categories does the only business located in the city of arcadia appear? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> at...
in which categories does the only business located in the city of arcadia appear?
public_review_platform
select t1.business_id from business_hours as t1 inner join days as t2 on t1.day_id = t2.day_id where t1.day_id = 1
Question: list by their id all businesses that are open on sunday. | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> attribute_id, business_id, ...
list by their id all businesses that are open on sunday.
public_review_platform
select count(t2.business_id) from attributes as t1 inner join business_attributes as t2 on t1.attribute_id = t2.attribute_id inner join business as t3 on t2.business_id = t3.business_id where t1.attribute_name = 'music_karaoke' and t3.active = 'false' and t2.attribute_value in ('none', 'no', 'false')
Question: how many businesses with music_karaoke attribute are closed? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> attribute_id, business_...
how many businesses with music_karaoke attribute are closed?
public_review_platform
select count(distinct t2.business_id) from reviews as t1 inner join business as t2 on t1.business_id = t2.business_id where t1.review_length = 'long' and t2.active = 'true' and t2.city = 'phoenix'
Question: how many open businesses in the city of phoenix have users left a long review? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> attri...
how many open businesses in the city of phoenix have users left a long review?
public_review_platform
select count(distinct t1.user_id) from users as t1 inner join reviews as t2 on t1.user_id = t2.user_id where t1.user_votes_cool = 'low' and t2.review_votes_cool = 'low'
Question: how many users who have received a low cool vote have also received at least 1 low cool vote for some of their reviews? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, ...
how many users who have received a low cool vote have also received at least 1 low cool vote for some of their reviews?
public_review_platform
select count(distinct t1.user_id) from users as t1 inner join tips as t2 on t1.user_id = t2.user_id where t2.tip_length = 'long' and t2.likes = 2 and t1.user_fans = 'high'
Question: how many users with a long tip and 2 likes for their tip have a high number of fans? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes ->...
how many users with a long tip and 2 likes for their tip have a high number of fans?
public_review_platform
select count(t2.business_id) from attributes as t1 inner join business_attributes as t2 on t1.attribute_id = t2.attribute_id where t1.attribute_name = 'ambience_trendy' and t2.attribute_value in ('none', 'no', 'false')
Question: in how many businesses with the ambience_trendy attribute? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> attribute_id, business_id...
in how many businesses with the ambience_trendy attribute?
public_review_platform
select count(distinct t2.business_id) from business as t1 inner join business_hours as t2 on t1.business_id = t2.business_id inner join days as t3 on t2.day_id = t3.day_id where t1.city = 'scottsdale' and t3.day_of_week = 'sunday' and t2.opening_time = '12pm'
Question: how many businesses in the city of scottsdale open on sunday at 12pm? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> attribute_id, ...
how many businesses in the city of scottsdale open on sunday at 12pm?
public_review_platform
select cast(sum(t1.stars) as real) / count(t1.business_id) from business as t1 inner join business_categories as t2 on t1.business_id = t2.business_id inner join categories as t3 on t2.category_id = t3.category_id where t3.category_name = 'obstetricians & gynecologists'
Question: what is the average number of stars for businesses in the obstetricians & gynecologists category? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_...
what is the average number of stars for businesses in the obstetricians & gynecologists category?
public_review_platform
select cast(sum(case when t3.user_fans = 'high' then 1 else 0 end) as real) * 100 / count(t3.user_fans) from years as t1 inner join elite as t2 on t1.year_id = t2.year_id inner join users as t3 on t2.user_id = t3.user_id where t1.actual_year = 2011
Question: calculate the percentage of users with a high number of fans who were elite in 2011. | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes ->...
calculate the percentage of users with a high number of fans who were elite in 2011.
public_review_platform
select count(business_id) from business where city = 'surprise'
Question: how many of the businesses are in surprise? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> attribute_id, business_id, attribute_val...
how many of the businesses are in surprise?
public_review_platform
select business_id from business where review_count = 'high' and city = 'tempe'
Question: list down the business id with a high review count in tempe. | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> attribute_id, business_...
list down the business id with a high review count in tempe.
public_review_platform
select count(business_id) from business where review_count = 'medium' and state = 'az' and active = 'true'
Question: what is the total number of active businesses in az with a medium review count? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> attr...
what is the total number of active businesses in az with a medium review count?
public_review_platform
select business_id from business where stars >= 3 and stars < 6 and city = 'chandler'
Question: list down the business id with a star range from 3 to 5, located at chandler. | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> attrib...
list down the business id with a star range from 3 to 5, located at chandler.
public_review_platform
select count(user_id) from users where user_yelping_since_year >= 2009 and user_yelping_since_year < 2012 and user_fans = 'low'
Question: in users yelping since 2009 to 2011, how many of them have low count of fans? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> attrib...
in users yelping since 2009 to 2011, how many of them have low count of fans?
public_review_platform
select review_length from reviews where user_id = 11021 and business_id = 3
Question: what is the review length of user 11021 to business with business id 3? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> attribute_id...
what is the review length of user 11021 to business with business id 3?
public_review_platform
select distinct t3.attribute_name from business as t1 inner join business_attributes as t2 on t1.business_id = t2.business_id inner join attributes as t3 on t2.attribute_id = t3.attribute_id where t1.city = 'tempe' and t1.review_count = 'medium'
Question: among the businesses in tempe, list the attribute of the business with a medium review count. | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attr...
among the businesses in tempe, list the attribute of the business with a medium review count.
public_review_platform
select count(distinct t1.business_id) from business as t1 inner join business_categories as t2 on t1.business_id = t2.business_id inner join categories as t3 on t2.category_id = t3.category_id where t3.category_name = 'food' and t1.stars < 3
Question: in businesses with a category of food, how many of them have a star rating below 3? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> ...
in businesses with a category of food, how many of them have a star rating below 3?
public_review_platform
select distinct t1.business_id, t1.stars from business as t1 inner join business_categories as t2 on t1.business_id = t2.business_id inner join categories as t3 on t2.category_id = t3.category_id where t3.category_name = 'food' and t1.active = 'true'
Question: list the active business id and its stars of the businesses fall under the category of food. | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attri...
list the active business id and its stars of the businesses fall under the category of food.
public_review_platform
select distinct t3.category_name, t5.attribute_name from business as t1 inner join business_categories as t2 on t1.business_id = t2.business_id inner join categories as t3 on t2.category_id = t3.category_id inner join business_attributes as t4 on t2.business_id = t4.business_id inner join attributes as t5 on t4.attribu...
Question: what is the category and attributes of businesses with highest star rating? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> attribut...
what is the category and attributes of businesses with highest star rating?
public_review_platform
select distinct t3.category_name from reviews as t1 inner join business_categories as t2 on t1.business_id = t2.business_id inner join categories as t3 on t2.category_id = t3.category_id where t2.business_id >= 7 and t2.business_id < 15 and t1.review_length = 'short' and t1.review_stars = ( select max(review_stars) fro...
Question: what is the category of the business with short review length and highest review stars within business id from 7 to 14? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, ...
what is the category of the business with short review length and highest review stars within business id from 7 to 14?
public_review_platform
select count(distinct t1.business_id) from business as t1 inner join business_attributes as t2 on t1.business_id = t2.business_id inner join attributes as t3 on t2.attribute_id = t3.attribute_id where t3.attribute_name = 'byob' and t1.review_count = 'high' and t1.active = 'true'
Question: count the active businesses that has an attribute of byob with high review count. | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> at...
count the active businesses that has an attribute of byob with high review count.
public_review_platform
select t2.opening_time, t2.closing_time from business as t1 inner join business_hours as t2 on t1.business_id = t2.business_id where t1.city = 'glendale' order by t1.stars desc limit 1
Question: what is the closing and opening time of businesses located at glendale with highest star rating? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_A...
what is the closing and opening time of businesses located at glendale with highest star rating?
public_review_platform
select t3.category_name, t5.attribute_name from business as t1 inner join business_categories as t2 on t1.business_id = t2.business_id inner join categories as t3 on t2.category_id = t3.category_id inner join business_attributes as t4 on t1.business_id = t4.business_id inner join attributes as t5 on t4.attribute_id = t...
Question: among the active businesses located at goodyear, az, list the category and atrributes of business with a high review count. | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_...
among the active businesses located at goodyear, az, list the category and atrributes of business with a high review count.
public_review_platform
select distinct t3.category_name from business_categories as t1 inner join business as t2 on t1.business_id = t2.business_id inner join categories as t3 on t1.category_id = t3.category_id where t2.active = 'true' and t2.state = 'az' and t2.city = 'glendale'
Question: list the categories of active businesses in glendale, az. | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> attribute_id, business_id,...
list the categories of active businesses in glendale, az.
public_review_platform
select distinct t1.city from business as t1 inner join business_hours as t2 on t1.business_id = t2.business_id inner join days as t3 on t2.day_id = t3.day_id where t2.opening_time = '7am' and t2.closing_time = '7pm' and t3.day_of_week = 'wednesday'
Question: find the location of businesses that has business hours from 7 am to 7 pm every wednesday. | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attribu...
find the location of businesses that has business hours from 7 am to 7 pm every wednesday.
public_review_platform
select distinct t2.attribute_value from business as t1 inner join business_attributes as t2 on t1.business_id = t2.business_id inner join attributes as t3 on t2.attribute_id = t3.attribute_id where t1.state = 'az' and t1.city = 'goodyear' and t1.active = 'true' and t1.stars = 3 and t1.review_count = 'low'
Question: what is the attribute value of an active business with a low review count and 3 stars which is located at goodyear, az? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, ...
what is the attribute value of an active business with a low review count and 3 stars which is located at goodyear, az?
public_review_platform
select distinct t2.opening_time from business as t1 inner join business_hours as t2 on t1.business_id = t2.business_id inner join days as t3 on t2.day_id = t3.day_id where t1.city = 'glendale' and t1.review_count = 'medium' and t1.active = 'true'
Question: what is the opening time of the active businesses in glendale that have a medium review count. | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Att...
what is the opening time of the active businesses in glendale that have a medium review count.
public_review_platform
select cast(sum(case when t1.stars > 3 then 1 else 0 end) as real) * 100 / count(t1.stars) from business as t1 inner join business_categories as t2 on t1.business_id = t2.business_id inner join categories as t3 on t2.category_id = t3.category_id where t3.category_name = 'food'
Question: among the businesses with a category of food, what is the percentage of the business with greater than 3 stars? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_y...
among the businesses with a category of food, what is the percentage of the business with greater than 3 stars?
public_review_platform
select distinct t2.closing_time, t3.day_of_week from business as t1 inner join business_hours as t2 on t1.business_id = t2.business_id inner join days as t3 on t2.day_id = t3.day_id where t1.active = 'true' and t1.city = 'goodyear' and t1.stars > ( select avg(stars) * 0.8 from business where active = 'true' and city = ...
Question: list the closing time and day of week of active businesses in goodyear with stars greater than the 80% of average age of star rating. | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Year...
list the closing time and day of week of active businesses in goodyear with stars greater than the 80% of average age of star rating.
citeseer
select cast(count(case when class_label = 'agents' then paper_id else null end) as real) * 100 / count(paper_id) from paper
Question: among all the citation, what is the percentage of paper id under the agents classification? | Tables: cites -> cited_paper_id, citing_paper_id. paper -> paper_id, class_label. content -> paper_id, word_cited_id. | Joins: content.paper_id = paper.paper_id,
among all the citation, what is the percentage of paper id under the agents classification?
citeseer
select word_cited_id, count(paper_id) from content group by word_cited_id order by count(word_cited_id) desc limit 1
Question: what is the most cited word? how many papers was that word cited in? | Tables: cites -> cited_paper_id, citing_paper_id. paper -> paper_id, class_label. content -> paper_id, word_cited_id. | Joins: content.paper_id = paper.paper_id,
what is the most cited word? how many papers was that word cited in?
citeseer
select count(distinct t2.word_cited_id) from paper as t1 inner join content as t2 on t1.paper_id = t2.paper_id where t1.class_label = 'ai'
Question: what is the total number of word cited under that class labelled 'ai'? | Tables: cites -> cited_paper_id, citing_paper_id. paper -> paper_id, class_label. content -> paper_id, word_cited_id. | Joins: content.paper_id = paper.paper_id,
what is the total number of word cited under that class labelled 'ai'?
citeseer
select t1.class_label, t2.word_cited_id from paper as t1 inner join content as t2 on t1.paper_id = t2.paper_id where t1.paper_id = 315017
Question: for all words cited in paper id 315017, state the other paper id and class label which also cited those words. | Tables: cites -> cited_paper_id, citing_paper_id. paper -> paper_id, class_label. content -> paper_id, word_cited_id. | Joins: content.paper_id = paper.paper_id,
for all words cited in paper id 315017, state the other paper id and class label which also cited those words.
citeseer
select t2.word_cited_id from paper as t1 inner join content as t2 on t1.paper_id = t2.paper_id where t1.class_label = 'db' group by t2.word_cited_id order by count(t2.word_cited_id) desc limit 1
Question: among all the db class type citation, which word is the most frequently cited? | Tables: cites -> cited_paper_id, citing_paper_id. paper -> paper_id, class_label. content -> paper_id, word_cited_id. | Joins: content.paper_id = paper.paper_id,
among all the db class type citation, which word is the most frequently cited?
citeseer
select cast(count(distinct case when t1.class_label = 'agents' then t2.word_cited_id else null end) as real) * 100 / count(distinct t2.word_cited_id) from paper as t1 inner join content as t2 on t1.paper_id = t2.paper_id
Question: calculate the percentage of words used in agents class label. | Tables: cites -> cited_paper_id, citing_paper_id. paper -> paper_id, class_label. content -> paper_id, word_cited_id. | Joins: content.paper_id = paper.paper_id,
calculate the percentage of words used in agents class label.
citeseer
select t1.paper_id, t1.class_label from paper as t1 inner join content as t2 on t1.paper_id = t2.paper_id group by t1.paper_id, t1.class_label order by count(t2.word_cited_id) desc limit 1
Question: which paper id cited the most word? in which class label does it belongs to? | Tables: cites -> cited_paper_id, citing_paper_id. paper -> paper_id, class_label. content -> paper_id, word_cited_id. | Joins: content.paper_id = paper.paper_id,
which paper id cited the most word? in which class label does it belongs to?
citeseer
select t1.paper_id, t1.class_label from paper as t1 inner join content as t2 on t1.paper_id = t2.paper_id where t2.word_cited_id = 'word1002'
Question: list all the paper id and its class type that cited the word 'word1002'. | Tables: cites -> cited_paper_id, citing_paper_id. paper -> paper_id, class_label. content -> paper_id, word_cited_id. | Joins: content.paper_id = paper.paper_id,
list all the paper id and its class type that cited the word 'word1002'.
citeseer
select distinct t2.word_cited_id from paper as t1 inner join content as t2 on t1.paper_id = t2.paper_id where t1.class_label = 'ai'
Question: list all words cited in the ai class label. | Tables: cites -> cited_paper_id, citing_paper_id. paper -> paper_id, class_label. content -> paper_id, word_cited_id. | Joins: content.paper_id = paper.paper_id,
list all words cited in the ai class label.
citeseer
select distinct t1.class_label, count(t2.word_cited_id) from paper as t1 inner join content as t2 on t1.paper_id = t2.paper_id where t1.paper_id = 'chakrabarti01integrating' group by t1.class_label
Question: what is the class label of paper id 'chakrabarti01integrating'. how many words were cited by this paper id? | Tables: cites -> cited_paper_id, citing_paper_id. paper -> paper_id, class_label. content -> paper_id, word_cited_id. | Joins: content.paper_id = paper.paper_id,
what is the class label of paper id 'chakrabarti01integrating'. how many words were cited by this paper id?
citeseer
select distinct t1.paper_id, t1.class_label from paper as t1 inner join content as t2 on t1.paper_id = t2.paper_id group by t2.paper_id, t1.class_label having count(t2.word_cited_id) > 20
Question: list all paper id and its class type with more than 20 cited words. | Tables: cites -> cited_paper_id, citing_paper_id. paper -> paper_id, class_label. content -> paper_id, word_cited_id. | Joins: content.paper_id = paper.paper_id,
list all paper id and its class type with more than 20 cited words.
citeseer
select distinct t2.word_cited_id from paper as t1 inner join content as t2 on t1.paper_id = t2.paper_id where t1.class_label = 'ai' or t1.class_label = 'ir'
Question: list the words that are cited in both ai and ir class label. | Tables: cites -> cited_paper_id, citing_paper_id. paper -> paper_id, class_label. content -> paper_id, word_cited_id. | Joins: content.paper_id = paper.paper_id,
list the words that are cited in both ai and ir class label.
citeseer
select cited_paper_id, count(cited_paper_id), ( select cited_paper_id from cites group by cited_paper_id order by count(cited_paper_id) asc limit 1 ), ( select count(cited_paper_id) from cites group by cited_paper_id order by count(cited_paper_id) asc limit 1 ) from cites group by cited_paper_id order by count(cited_pa...
Question: name the paper which is cited most times and the paper which is cited least times? also, find the number of times each one is cited. | Tables: cites -> cited_paper_id, citing_paper_id. paper -> paper_id, class_label. content -> paper_id, word_cited_id. | Joins: content.paper_id = paper.paper_id,
name the paper which is cited most times and the paper which is cited least times? also, find the number of times each one is cited.
citeseer
select cast(count(case when class_label = 'ml' then paper_id else null end) as real) / count(paper_id) from paper
Question: on average, how many papers are under the ml class? | Tables: cites -> cited_paper_id, citing_paper_id. paper -> paper_id, class_label. content -> paper_id, word_cited_id. | Joins: content.paper_id = paper.paper_id,
on average, how many papers are under the ml class?
citeseer
select distinct t2.word_cited_id from cites as t1 inner join content as t2 on t1.cited_paper_id = t2.paper_id where t1.citing_paper_id = 'sima01computational'
Question: find the words cited in papers that are cited by sima01computational? | Tables: cites -> cited_paper_id, citing_paper_id. paper -> paper_id, class_label. content -> paper_id, word_cited_id. | Joins: content.paper_id = paper.paper_id,
find the words cited in papers that are cited by sima01computational?
citeseer
select count(t2.paper_id) from cites as t1 inner join content as t2 on t1.cited_paper_id = t2.paper_id where t1.citing_paper_id = 'schmidt99advanced' and t2.word_cited_id = 'word3555'
Question: how many papers were cited by schmidt99advanced cited word3555? | Tables: cites -> cited_paper_id, citing_paper_id. paper -> paper_id, class_label. content -> paper_id, word_cited_id. | Joins: content.paper_id = paper.paper_id,
how many papers were cited by schmidt99advanced cited word3555?
citeseer
select distinct t1.class_label from paper as t1 inner join content as t2 on t1.paper_id = t2.paper_id where t2.word_cited_id = 'word1163'
Question: under what classification do the papers that cited word1163 belong? | Tables: cites -> cited_paper_id, citing_paper_id. paper -> paper_id, class_label. content -> paper_id, word_cited_id. | Joins: content.paper_id = paper.paper_id,
under what classification do the papers that cited word1163 belong?
citeseer
select t1.paper_id from paper as t1 inner join content as t2 on t1.paper_id = t2.paper_id where t1.class_label = 'db' group by t1.paper_id order by count(t2.word_cited_id) desc limit 1
Question: among the papers under db classification, which paper has the highest number of words cited? | Tables: cites -> cited_paper_id, citing_paper_id. paper -> paper_id, class_label. content -> paper_id, word_cited_id. | Joins: content.paper_id = paper.paper_id,
among the papers under db classification, which paper has the highest number of words cited?
citeseer
select count(t1.paper_id) from paper as t1 inner join cites as t2 on t1.paper_id = t2.citing_paper_id where t1.class_label = 'ml' and t2.cited_paper_id = 'butz01algorithmic'
Question: in the papers classified as ml, how many cited butz01algorithmic? | Tables: cites -> cited_paper_id, citing_paper_id. paper -> paper_id, class_label. content -> paper_id, word_cited_id. | Joins: content.paper_id = paper.paper_id,
in the papers classified as ml, how many cited butz01algorithmic?
simpson_episodes
select name from person where birthdate is not null order by birthdate asc limit 1;
Question: which crew member of the simpson 20s is the oldest? | Tables: Episode -> episode_id, season, episode, number_in_series, title, summary, air_date, episode_image, rating, votes. Person -> name, birthdate, birth_name, birth_place, birth_region, birth_country, height_meters, nickname. Award -> award_id, organizat...
which crew member of the simpson 20s is the oldest?
simpson_episodes
select nickname from person where name = 'dan castellaneta';
Question: what's the nickname for dan castellaneta? | Tables: Episode -> episode_id, season, episode, number_in_series, title, summary, air_date, episode_image, rating, votes. Person -> name, birthdate, birth_name, birth_place, birth_region, birth_country, height_meters, nickname. Award -> award_id, organization, year,...
what's the nickname for dan castellaneta?
simpson_episodes
select count(name) from person where birth_region = 'new york' and substr(birthdate, 1, 4) > '1970';
Question: among the crew members of the simpson 20s born in the new york city, how many of them were born after the year 1970? | Tables: Episode -> episode_id, season, episode, number_in_series, title, summary, air_date, episode_image, rating, votes. Person -> name, birthdate, birth_name, birth_place, birth_region, bir...
among the crew members of the simpson 20s born in the new york city, how many of them were born after the year 1970?
simpson_episodes
select t1.birth_country from person as t1 inner join award as t2 on t1.name = t2.person where t2.award = 'outstanding voice-over performance' and t2.year = 2009 and t2.result = 'winner';
Question: in which country was the winner of the outstanding voice-over performance award of 2009 born? | Tables: Episode -> episode_id, season, episode, number_in_series, title, summary, air_date, episode_image, rating, votes. Person -> name, birthdate, birth_name, birth_place, birth_region, birth_country, height_mete...
in which country was the winner of the outstanding voice-over performance award of 2009 born?
simpson_episodes
select t2.award from person as t1 inner join award as t2 on t1.name = t2.person where t1.nickname = 'doofus' and t2.result = 'winner';
Question: please list the names of all the awards won by the crew member whose nickname is doofus. | Tables: Episode -> episode_id, season, episode, number_in_series, title, summary, air_date, episode_image, rating, votes. Person -> name, birthdate, birth_name, birth_place, birth_region, birth_country, height_meters, n...
please list the names of all the awards won by the crew member whose nickname is doofus.
simpson_episodes
select count(*) from person as t1 inner join award as t2 on t1.name = t2.person where t1.birth_country = 'usa' and t2.result = 'nominee' and t2.award = 'outstanding animated program (for programming less than one hour)' and t2.year = 2009;
Question: how many crew members who were born in the usa were nominated for the outstanding animated program (for programming less than one hour) award in 2009? | Tables: Episode -> episode_id, season, episode, number_in_series, title, summary, air_date, episode_image, rating, votes. Person -> name, birthdate, birth_na...
how many crew members who were born in the usa were nominated for the outstanding animated program (for programming less than one hour) award in 2009?
simpson_episodes
select distinct t1.character from character_award as t1 inner join award as t2 on t1.award_id = t2.award_id where t2.award = 'outstanding voice-over performance' and t2.year = 2009 and t2.result = 'winner';
Question: which character won the outstanding voice-over performance award in 2009? | Tables: Episode -> episode_id, season, episode, number_in_series, title, summary, air_date, episode_image, rating, votes. Person -> name, birthdate, birth_name, birth_place, birth_region, birth_country, height_meters, nickname. Award ...
which character won the outstanding voice-over performance award in 2009?
simpson_episodes
select t2.keyword from episode as t1 inner join keyword as t2 on t1.episode_id = t2.episode_id where t1.title = 'lost verizon';
Question: please list all the keywords of the episode lost verizon. | Tables: Episode -> episode_id, season, episode, number_in_series, title, summary, air_date, episode_image, rating, votes. Person -> name, birthdate, birth_name, birth_place, birth_region, birth_country, height_meters, nickname. Award -> award_id, org...
please list all the keywords of the episode lost verizon.
simpson_episodes
select count(t2.keyword) from episode as t1 inner join keyword as t2 on t1.episode_id = t2.episode_id where t1.air_date = '2008-10-19';
Question: how many keywords does the episode that was aired on 2008/10/19 have? | Tables: Episode -> episode_id, season, episode, number_in_series, title, summary, air_date, episode_image, rating, votes. Person -> name, birthdate, birth_name, birth_place, birth_region, birth_country, height_meters, nickname. Award -> a...
how many keywords does the episode that was aired on 2008/10/19 have?
simpson_episodes
select t2.rating from award as t1 inner join episode as t2 on t1.episode_id = t2.episode_id where t1.award = 'outstanding voice-over performance' and substr(t1.year, 1, 4) = '2009' and t1.person = 'dan castellaneta';
Question: what's the rating of the episode in which dan castellaneta won the outstanding voice-over performance award in 2009? | Tables: Episode -> episode_id, season, episode, number_in_series, title, summary, air_date, episode_image, rating, votes. Person -> name, birthdate, birth_name, birth_place, birth_region, bir...
what's the rating of the episode in which dan castellaneta won the outstanding voice-over performance award in 2009?
simpson_episodes
select count(*) from episode as t1 inner join vote as t2 on t2.episode_id = t1.episode_id where t1.title = 'lost verizon' and t2.stars = 7;
Question: how many 7-star votes in star score did the episode lost verizon have? | Tables: Episode -> episode_id, season, episode, number_in_series, title, summary, air_date, episode_image, rating, votes. Person -> name, birthdate, birth_name, birth_place, birth_region, birth_country, height_meters, nickname. Award -> ...
how many 7-star votes in star score did the episode lost verizon have?
simpson_episodes
select t2.stars from episode as t1 inner join vote as t2 on t2.episode_id = t1.episode_id where t1.title = 'lost verizon' order by t2.votes desc limit 1;
Question: how many stars did most of the voters give in star score for the episode lost verizon? | Tables: Episode -> episode_id, season, episode, number_in_series, title, summary, air_date, episode_image, rating, votes. Person -> name, birthdate, birth_name, birth_place, birth_region, birth_country, height_meters, nic...
how many stars did most of the voters give in star score for the episode lost verizon?
simpson_episodes
select t1.title from episode as t1 inner join vote as t2 on t2.episode_id = t1.episode_id where t2.votes > 200 and t2.stars = 10;
Question: please list the titles of the episodes that have over 200 voters voting a 10 in star score. | Tables: Episode -> episode_id, season, episode, number_in_series, title, summary, air_date, episode_image, rating, votes. Person -> name, birthdate, birth_name, birth_place, birth_region, birth_country, height_meters...
please list the titles of the episodes that have over 200 voters voting a 10 in star score.
simpson_episodes
select count(*) from episode as t1 inner join vote as t2 on t2.episode_id = t1.episode_id where substr(t1.air_date, 1, 4) = '2009' and t2.stars = 10 and t2.percent > 15;
Question: how many episodes aired in the year 2009 have over 15% of voters giving 10 stars in star score? | Tables: Episode -> episode_id, season, episode, number_in_series, title, summary, air_date, episode_image, rating, votes. Person -> name, birthdate, birth_name, birth_place, birth_region, birth_country, height_me...
how many episodes aired in the year 2009 have over 15% of voters giving 10 stars in star score?
simpson_episodes
select t1.title from episode as t1 inner join vote as t2 on t2.episode_id = t1.episode_id where t2.stars = 7 order by t2.votes desc limit 1;
Question: what's the title of the episode that got the most 7-star votes in star score? | Tables: Episode -> episode_id, season, episode, number_in_series, title, summary, air_date, episode_image, rating, votes. Person -> name, birthdate, birth_name, birth_place, birth_region, birth_country, height_meters, nickname. Aw...
what's the title of the episode that got the most 7-star votes in star score?
simpson_episodes
select cast(sum(t2.votes * t2.stars) as real) / sum(t2.votes) from episode as t1 inner join vote as t2 on t2.episode_id = t1.episode_id where t1.title = 'lost verizon';
Question: how many stars on average does the episode lost verizon have? | Tables: Episode -> episode_id, season, episode, number_in_series, title, summary, air_date, episode_image, rating, votes. Person -> name, birthdate, birth_name, birth_place, birth_region, birth_country, height_meters, nickname. Award -> award_id,...
how many stars on average does the episode lost verizon have?
simpson_episodes
select cast(sum(case when t1.award_category = 'primetime emmy' then 1 else 0 end) as real) * 100 / count(*) from award as t1 inner join episode as t2 on t1.episode_id = t2.episode_id where t2.rating > 7 and t1.result = 'nominee';
Question: what is the percentage of primetime emmy nominated episodes with a rating over 7 to all the episodes that have a rating over 7? | Tables: Episode -> episode_id, season, episode, number_in_series, title, summary, air_date, episode_image, rating, votes. Person -> name, birthdate, birth_name, birth_place, birth_...
what is the percentage of primetime emmy nominated episodes with a rating over 7 to all the episodes that have a rating over 7?
simpson_episodes
select t1.title from episode as t1 inner join credit as t2 on t1.episode_id = t2.episode_id where t2.person = 'pamela hayden' and t2.role = 'ruthie';
Question: name the title of the episode where pamela hayden voiced the character 'ruthie.' | Tables: Episode -> episode_id, season, episode, number_in_series, title, summary, air_date, episode_image, rating, votes. Person -> name, birthdate, birth_name, birth_place, birth_region, birth_country, height_meters, nickname....
name the title of the episode where pamela hayden voiced the character 'ruthie.'
simpson_episodes
select t2.role, t1.episode, t1.number_in_series from episode as t1 inner join credit as t2 on t1.episode_id = t2.episode_id where t2.person = 'matt groening' and t1.title = 'in the name of the grandfather';
Question: list down all the roles of matt groening on the episode titled 'in the name of the grandfather' along with the episode number and series number. | Tables: Episode -> episode_id, season, episode, number_in_series, title, summary, air_date, episode_image, rating, votes. Person -> name, birthdate, birth_name, bi...
list down all the roles of matt groening on the episode titled 'in the name of the grandfather' along with the episode number and series number.
simpson_episodes
select t1.title, t1.summary from episode as t1 inner join keyword as t2 on t1.episode_id = t2.episode_id where t2.keyword = 'eviction';
Question: write down the title and summary of the episode with the keyword 'eviction.' | Tables: Episode -> episode_id, season, episode, number_in_series, title, summary, air_date, episode_image, rating, votes. Person -> name, birthdate, birth_name, birth_place, birth_region, birth_country, height_meters, nickname. Awa...
write down the title and summary of the episode with the keyword 'eviction.'
simpson_episodes
select avg(t2.stars) from episode as t1 inner join vote as t2 on t2.episode_id = t1.episode_id where t1.title = 'wedding for disaster';
Question: what is the average number of stars received by the episode titled 'wedding for disaster.' | Tables: Episode -> episode_id, season, episode, number_in_series, title, summary, air_date, episode_image, rating, votes. Person -> name, birthdate, birth_name, birth_place, birth_region, birth_country, height_meters,...
what is the average number of stars received by the episode titled 'wedding for disaster.'
simpson_episodes
select t1.title, t2.keyword from episode as t1 inner join keyword as t2 on t1.episode_id = t2.episode_id where t1.air_date = '2009-03-22';
Question: write the title and all the keywords of the episode that was aired on 3/22/2009. | Tables: Episode -> episode_id, season, episode, number_in_series, title, summary, air_date, episode_image, rating, votes. Person -> name, birthdate, birth_name, birth_place, birth_region, birth_country, height_meters, nickname....
write the title and all the keywords of the episode that was aired on 3/22/2009.
simpson_episodes
select distinct t1.birth_name from person as t1 inner join credit as t2 on t1.name = t2.person where t2.role = 'helen lovejoy';
Question: what is the birth name of the person who voiced 'helen lovejoy?' | Tables: Episode -> episode_id, season, episode, number_in_series, title, summary, air_date, episode_image, rating, votes. Person -> name, birthdate, birth_name, birth_place, birth_region, birth_country, height_meters, nickname. Award -> award_...
what is the birth name of the person who voiced 'helen lovejoy?'
simpson_episodes
select cast(sum(case when t2.credited = 'false' then 1 end) as real) * 100 / sum(case when t2.credited = 'true' then 1 end), t3.title, t2.person from award as t1 inner join credit as t2 on t2.episode_id = t1.episode_id inner join episode as t3 on t1.episode_id = t3.episode_id where substr(t1.year, 1, 4) = '2017' and t1...
Question: what is the percentage ratio between uncredited and credited roles on the episode that won the 2017 jupiter award for best international tv series? please include the title of the episode and the names of the persons who were uncredited alongside their role in that episode. | Tables: Episode -> episode_id, se...
what is the percentage ratio between uncredited and credited roles on the episode that won the 2017 jupiter award for best international tv series? please include the title of the episode and the names of the persons who were uncredited alongside their role in that episode.
simpson_episodes
select count(episode_id) from episode where votes > 1000;
Question: how many episodes have more than 1000 votes? | Tables: Episode -> episode_id, season, episode, number_in_series, title, summary, air_date, episode_image, rating, votes. Person -> name, birthdate, birth_name, birth_place, birth_region, birth_country, height_meters, nickname. Award -> award_id, organization, ye...
how many episodes have more than 1000 votes?
simpson_episodes
select count(name) from person where birth_place = 'new york city' and birth_country = 'usa';
Question: how many persons were born in new york, usa? | Tables: Episode -> episode_id, season, episode, number_in_series, title, summary, air_date, episode_image, rating, votes. Person -> name, birthdate, birth_name, birth_place, birth_region, birth_country, height_meters, nickname. Award -> award_id, organization, ye...
how many persons were born in new york, usa?
simpson_episodes
select award_id, award_category from award where person = 'marc wilmore';
Question: list the name of all awards along with the award category, nominated by marc wilmore. | Tables: Episode -> episode_id, season, episode, number_in_series, title, summary, air_date, episode_image, rating, votes. Person -> name, birthdate, birth_name, birth_place, birth_region, birth_country, height_meters, nick...
list the name of all awards along with the award category, nominated by marc wilmore.
simpson_episodes
select count(name) from person where nickname is not null;
Question: how many crew have their own nickname? list their full name along with the nickname. | Tables: Episode -> episode_id, season, episode, number_in_series, title, summary, air_date, episode_image, rating, votes. Person -> name, birthdate, birth_name, birth_place, birth_region, birth_country, height_meters, nickn...
how many crew have their own nickname? list their full name along with the nickname.
simpson_episodes
select avg(height_meters) from person;
Question: find the average height for each person. | Tables: Episode -> episode_id, season, episode, number_in_series, title, summary, air_date, episode_image, rating, votes. Person -> name, birthdate, birth_name, birth_place, birth_region, birth_country, height_meters, nickname. Award -> award_id, organization, year, ...
find the average height for each person.
simpson_episodes
select max(votes) - min(votes) from vote;
Question: calculate the difference between the highest votes for episode and the lowest votes for episode. | Tables: Episode -> episode_id, season, episode, number_in_series, title, summary, air_date, episode_image, rating, votes. Person -> name, birthdate, birth_name, birth_place, birth_region, birth_country, height_m...
calculate the difference between the highest votes for episode and the lowest votes for episode.
simpson_episodes
select t2.character from award as t1 inner join character_award as t2 on t1.award_id = t2.award_id where t1.year = 2009 and t1.award = 'outstanding voice-over performance';
Question: list the name character awarded for the outstanding voice-over performance award in 2009. | Tables: Episode -> episode_id, season, episode, number_in_series, title, summary, air_date, episode_image, rating, votes. Person -> name, birthdate, birth_name, birth_place, birth_region, birth_country, height_meters, ...
list the name character awarded for the outstanding voice-over performance award in 2009.
simpson_episodes
select count(*) from person as t1 inner join award as t2 on t1.name = t2.person where t2.year = 2009 and t2.award = 'comedy series' and t1.birth_region = 'california';
Question: among the person nominated for the comedy series award in 2009, how many of them were born in california? | Tables: Episode -> episode_id, season, episode, number_in_series, title, summary, air_date, episode_image, rating, votes. Person -> name, birthdate, birth_name, birth_place, birth_region, birth_country,...
among the person nominated for the comedy series award in 2009, how many of them were born in california?
simpson_episodes
select t2.title from award as t1 inner join episode as t2 on t1.episode_id = t2.episode_id where substr(t1.year, 1, 4) = '2017' and t1.award = 'best international tv series' and t1.result = 'winner';
Question: what is the title of episode that won the best international tv series award in 2017? | Tables: Episode -> episode_id, season, episode, number_in_series, title, summary, air_date, episode_image, rating, votes. Person -> name, birthdate, birth_name, birth_place, birth_region, birth_country, height_meters, nick...
what is the title of episode that won the best international tv series award in 2017?
simpson_episodes
select t2.person from episode as t1 inner join credit as t2 on t1.episode_id = t2.episode_id where t1.title = 'how the test was won' and t2.credited = 'false';
Question: list the name of persons who were not included in the credit for the 'how the test was won' episode. | Tables: Episode -> episode_id, season, episode, number_in_series, title, summary, air_date, episode_image, rating, votes. Person -> name, birthdate, birth_name, birth_place, birth_region, birth_country, heig...
list the name of persons who were not included in the credit for the 'how the test was won' episode.
simpson_episodes
select distinct t1.title from episode as t1 inner join keyword as t2 on t1.episode_id = t2.episode_id where t2.keyword in ('riot', 'cake');
Question: what is the title of episode that has a keyword of 'riot' and 'cake'? | Tables: Episode -> episode_id, season, episode, number_in_series, title, summary, air_date, episode_image, rating, votes. Person -> name, birthdate, birth_name, birth_place, birth_region, birth_country, height_meters, nickname. Award -> a...
what is the title of episode that has a keyword of 'riot' and 'cake'?
simpson_episodes
select t1.title from episode as t1 inner join vote as t2 on t2.episode_id = t1.episode_id where t2.stars = 10 order by t1.votes desc limit 1;
Question: which episode has the most vote for 10 stars rating? | Tables: Episode -> episode_id, season, episode, number_in_series, title, summary, air_date, episode_image, rating, votes. Person -> name, birthdate, birth_name, birth_place, birth_region, birth_country, height_meters, nickname. Award -> award_id, organiza...
which episode has the most vote for 10 stars rating?
simpson_episodes
select distinct t2.person from episode as t1 inner join credit as t2 on t1.episode_id = t2.episode_id where substr(t1.air_date, 6, 2) between '10' and '11';
Question: name all the person who involved in the making of simpson 20s episode that aired between october to november. | Tables: Episode -> episode_id, season, episode, number_in_series, title, summary, air_date, episode_image, rating, votes. Person -> name, birthdate, birth_name, birth_place, birth_region, birth_coun...
name all the person who involved in the making of simpson 20s episode that aired between october to november.
simpson_episodes
select t2.person from episode as t1 inner join credit as t2 on t1.episode_id = t2.episode_id where t1.title = 'treehouse of horror xix' and t2.role = 'director';
Question: state the name of director for the 'treehouse of horror xix' episode. | Tables: Episode -> episode_id, season, episode, number_in_series, title, summary, air_date, episode_image, rating, votes. Person -> name, birthdate, birth_name, birth_place, birth_region, birth_country, height_meters, nickname. Award -> a...
state the name of director for the 'treehouse of horror xix' episode.
simpson_episodes
select count(distinct t2.role) from episode as t1 inner join credit as t2 on t1.episode_id = t2.episode_id where t1.episode = 5;
Question: based on the credits, state how many roles were played in the 5th episode of simpson 20. | Tables: Episode -> episode_id, season, episode, number_in_series, title, summary, air_date, episode_image, rating, votes. Person -> name, birthdate, birth_name, birth_place, birth_region, birth_country, height_meters, n...
based on the credits, state how many roles were played in the 5th episode of simpson 20.
simpson_episodes
select t2.keyword from episode as t1 inner join keyword as t2 on t1.episode_id = t2.episode_id where t1.title = 'take my life, please';
Question: list all the keyword for 'take my life, please' episode. | Tables: Episode -> episode_id, season, episode, number_in_series, title, summary, air_date, episode_image, rating, votes. Person -> name, birthdate, birth_name, birth_place, birth_region, birth_country, height_meters, nickname. Award -> award_id, orga...
list all the keyword for 'take my life, please' episode.
simpson_episodes
select cast(sum(case when t1.award = 'outstanding voice-over performance' then 1 else 0 end) as real) * 100 / count(t2.episode_id) from award as t1 inner join episode as t2 on t1.episode_id = t2.episode_id where t2.votes > 950 and t1.year = 2009;
Question: among the episode that get more than 950 votes, how many of the episodes were nominated for the 'outstanding voice-over performance award in 2009'? find the percentage of the episodes. | Tables: Episode -> episode_id, season, episode, number_in_series, title, summary, air_date, episode_image, rating, votes. P...
among the episode that get more than 950 votes, how many of the episodes were nominated for the 'outstanding voice-over performance award in 2009'? find the percentage of the episodes.
simpson_episodes
select cast(sum(case when t1.title = 'no loan again, naturally' then t1.votes else 0 end) as real) / sum(case when t1.title = 'coming to homerica' then t1.votes else 0 end) as ratio from episode as t1 inner join vote as t2 on t2.episode_id = t1.episode_id where t2.stars = 5;
Question: what is the ratio between the 5 stars votes for 'no loan again, naturally' episode and 'coming to homerica' episode? | Tables: Episode -> episode_id, season, episode, number_in_series, title, summary, air_date, episode_image, rating, votes. Person -> name, birthdate, birth_name, birth_place, birth_region, bir...
what is the ratio between the 5 stars votes for 'no loan again, naturally' episode and 'coming to homerica' episode?