db_id
stringlengths
4
31
SQL
stringlengths
18
1.45k
input_sequence
stringlengths
148
11k
question
stringlengths
16
325
talkingdata
select sum(iif(t1.age > 20, 1, 0)) / count(t1.device_id) as per from gender_age as t1 inner join phone_brand_device_model2 as t2 on t1.device_id = t2.device_id where t2.phone_brand = 'sugar'
Question: among the users who use sugar, calculate the percentage of those who are above 20 years old. | Tables: app_all -> app_id. app_events -> event_id, app_id, is_installed, is_active. app_events_relevant -> event_id, app_id, is_installed, is_active. app_labels -> app_id, label_id. events -> event_id, device_id, ti...
among the users who use sugar, calculate the percentage of those who are above 20 years old.
talkingdata
select longitude, latitude from events where date(timestamp) = '2016-04-30'
Question: indicate the location of all the events that occurred on april 30, 2016. | Tables: app_all -> app_id. app_events -> event_id, app_id, is_installed, is_active. app_events_relevant -> event_id, app_id, is_installed, is_active. app_labels -> app_id, label_id. events -> event_id, device_id, timestamp, longitude, ...
indicate the location of all the events that occurred on april 30, 2016.
talkingdata
select count(device_model) from phone_brand_device_model2 where phone_brand = 'htc'
Question: how many different models does the htc brand have? | Tables: app_all -> app_id. app_events -> event_id, app_id, is_installed, is_active. app_events_relevant -> event_id, app_id, is_installed, is_active. app_labels -> app_id, label_id. events -> event_id, device_id, timestamp, longitude, latitude. events_relev...
how many different models does the htc brand have?
talkingdata
select app_id from app_events where is_active = 1 and is_installed = 1
Question: identify all installed and activated apps by their id. | Tables: app_all -> app_id. app_events -> event_id, app_id, is_installed, is_active. app_events_relevant -> event_id, app_id, is_installed, is_active. app_labels -> app_id, label_id. events -> event_id, device_id, timestamp, longitude, latitude. events_r...
identify all installed and activated apps by their id.
talkingdata
select count(app_id) from app_labels where label_id = 7
Question: how many apps are labeled 7? | Tables: app_all -> app_id. app_events -> event_id, app_id, is_installed, is_active. app_events_relevant -> event_id, app_id, is_installed, is_active. app_labels -> app_id, label_id. events -> event_id, device_id, timestamp, longitude, latitude. events_relevant -> event_id, devic...
how many apps are labeled 7?
talkingdata
select device_id from gender_age_train where age between 29 and 31 and gender = 'f'
Question: identify by their id all the devices that are used by women who are in the age range of 29 to 31 years. | Tables: app_all -> app_id. app_events -> event_id, app_id, is_installed, is_active. app_events_relevant -> event_id, app_id, is_installed, is_active. app_labels -> app_id, label_id. events -> event_id, de...
identify by their id all the devices that are used by women who are in the age range of 29 to 31 years.
talkingdata
select t2.app_id from label_categories as t1 inner join app_labels as t2 on t1.label_id = t2.label_id where t1.category = 'game-stress reliever'
Question: identify by their id all the apps that belong to the game-stress reliever category. | Tables: app_all -> app_id. app_events -> event_id, app_id, is_installed, is_active. app_events_relevant -> event_id, app_id, is_installed, is_active. app_labels -> app_id, label_id. events -> event_id, device_id, timestamp, ...
identify by their id all the apps that belong to the game-stress reliever category.
talkingdata
select t.timestamp from ( select t2.timestamp, count(t2.event_id) as num from gender_age as t1 inner join events_relevant as t2 on t1.device_id = t2.device_id where t1.gender = 'm' and t1.age = 40 group by t2.timestamp ) as t order by t.num desc limit 1
Question: on what date were the most events logged on devices for 40-year-old male users? | Tables: app_all -> app_id. app_events -> event_id, app_id, is_installed, is_active. app_events_relevant -> event_id, app_id, is_installed, is_active. app_labels -> app_id, label_id. events -> event_id, device_id, timestamp, long...
on what date were the most events logged on devices for 40-year-old male users?
talkingdata
select t.phone_brand from ( select t1.phone_brand, count(t4.is_active) as num from phone_brand_device_model2 as t1 inner join gender_age as t2 on t1.device_id = t2.device_id inner join events_relevant as t3 on t2.device_id = t3.device_id inner join app_events_relevant as t4 on t3.event_id = t4.event_id where t4.is_acti...
Question: on which brand of phone are the most applications installed? | Tables: app_all -> app_id. app_events -> event_id, app_id, is_installed, is_active. app_events_relevant -> event_id, app_id, is_installed, is_active. app_labels -> app_id, label_id. events -> event_id, device_id, timestamp, longitude, latitude. ev...
on which brand of phone are the most applications installed?
talkingdata
select count(t1.device_id) from gender_age as t1 inner join events_relevant as t2 on t1.device_id = t2.device_id inner join app_events_relevant as t3 on t2.event_id = t3.event_id where t1.gender = 'm' and t3.is_active = 0 and t1.age < 23
Question: how many men under the age of 23 have apps installed but are not active on their devices? | Tables: app_all -> app_id. app_events -> event_id, app_id, is_installed, is_active. app_events_relevant -> event_id, app_id, is_installed, is_active. app_labels -> app_id, label_id. events -> event_id, device_id, times...
how many men under the age of 23 have apps installed but are not active on their devices?
talkingdata
select count(t1.device_id) from gender_age as t1 inner join events_relevant as t2 on t1.device_id = t2.device_id inner join app_events_relevant as t3 on t2.event_id = t3.event_id where t1.age < 23 and t1.gender = 'f' and t3.is_active = 0 and t3.is_installed = 1
Question: how many women have apps from the game-finding fault category installed on their device? | Tables: app_all -> app_id. app_events -> event_id, app_id, is_installed, is_active. app_events_relevant -> event_id, app_id, is_installed, is_active. app_labels -> app_id, label_id. events -> event_id, device_id, timest...
how many women have apps from the game-finding fault category installed on their device?
talkingdata
select t.gender from ( select t1.gender, count(t1.device_id) as num from gender_age as t1 inner join events_relevant as t2 on t1.device_id = t2.device_id where date(t2.timestamp) between '2016-05-01' and '2016-05-10' group by t1.gender ) as t order by t.num desc limit 1
Question: which gender logged in the most to an event in the first 10 days of may 2016? | Tables: app_all -> app_id. app_events -> event_id, app_id, is_installed, is_active. app_events_relevant -> event_id, app_id, is_installed, is_active. app_labels -> app_id, label_id. events -> event_id, device_id, timestamp, longit...
which gender logged in the most to an event in the first 10 days of may 2016?
talkingdata
select t.`group` from ( select t1.`group`, count(t1.device_id) as num from gender_age as t1 inner join phone_brand_device_model2 as t2 on t1.device_id = t2.device_id where t2.device_model = 'sm-t2558' group by t1.`group` ) as t order by t.num desc limit 1
Question: what age group is the most using sm-t2558 model phones? | Tables: app_all -> app_id. app_events -> event_id, app_id, is_installed, is_active. app_events_relevant -> event_id, app_id, is_installed, is_active. app_labels -> app_id, label_id. events -> event_id, device_id, timestamp, longitude, latitude. events_...
what age group is the most using sm-t2558 model phones?
talkingdata
select count(t1.device_id) from gender_age as t1 inner join phone_brand_device_model2 as t2 on t1.device_id = t2.device_id where t1.age > 50 and t2.device_model != 'one m8 eye' and t2.phone_brand != 'htc'
Question: how many people over the age of 50 do not have htc one m8 eye phones? | Tables: app_all -> app_id. app_events -> event_id, app_id, is_installed, is_active. app_events_relevant -> event_id, app_id, is_installed, is_active. app_labels -> app_id, label_id. events -> event_id, device_id, timestamp, longitude, lat...
how many people over the age of 50 do not have htc one m8 eye phones?
talkingdata
select t1.device_id from gender_age as t1 inner join events_relevant as t2 on t1.device_id = t2.device_id where t1.gender = 'f' and t1.age < 30
Question: locate all events on devices of women under 30 years old. | Tables: app_all -> app_id. app_events -> event_id, app_id, is_installed, is_active. app_events_relevant -> event_id, app_id, is_installed, is_active. app_labels -> app_id, label_id. events -> event_id, device_id, timestamp, longitude, latitude. event...
locate all events on devices of women under 30 years old.
talkingdata
select sum(iif(t1.gender = 'f', 1, 0)) / sum(iif(t1.gender = 'm', 1, 0)) as per from gender_age as t1 inner join events_relevant as t2 on t1.device_id = t2.device_id inner join app_events_relevant as t3 on t2.event_id = t3.event_id where t3.is_installed = 0
Question: what percentage of women do not have applications installed on their mobile with respect to men? | Tables: app_all -> app_id. app_events -> event_id, app_id, is_installed, is_active. app_events_relevant -> event_id, app_id, is_installed, is_active. app_labels -> app_id, label_id. events -> event_id, device_id...
what percentage of women do not have applications installed on their mobile with respect to men?
talkingdata
select avg(t1.age) from gender_age as t1 inner join events_relevant as t2 on t1.device_id = t2.device_id inner join app_events_relevant as t3 on t2.event_id = t3.event_id where t3.is_installed = 1 and t3.is_active = 0
Question: calculate the average age of people who have apps installed but are not active on their devices. | Tables: app_all -> app_id. app_events -> event_id, app_id, is_installed, is_active. app_events_relevant -> event_id, app_id, is_installed, is_active. app_labels -> app_id, label_id. events -> event_id, device_id...
calculate the average age of people who have apps installed but are not active on their devices.
talkingdata
select event_id from events where timestamp like '2016-05-01%' and latitude = 31 limit 3
Question: please list any three events that happened on the 1st of may 2016 that have the same latitude of 31. | Tables: app_all -> app_id. app_events -> event_id, app_id, is_installed, is_active. app_events_relevant -> event_id, app_id, is_installed, is_active. app_labels -> app_id, label_id. events -> event_id, devic...
please list any three events that happened on the 1st of may 2016 that have the same latitude of 31.
talkingdata
select event_id from events where longitude = 0 and latitude = 0 limit 3
Question: please list any three events that have the longitude and latitude of 0. | Tables: app_all -> app_id. app_events -> event_id, app_id, is_installed, is_active. app_events_relevant -> event_id, app_id, is_installed, is_active. app_labels -> app_id, label_id. events -> event_id, device_id, timestamp, longitude, l...
please list any three events that have the longitude and latitude of 0.
talkingdata
select sum(iif(latitude != 0 and longitude != 0, 1, 0)) - sum(iif(latitude = 0 and longitude = 0, 1, 0)) as diff from events where device_id = '-922956879900150000'
Question: what is the difference between the events of device number -9222956879900150000 that can be located and those that are unable to be located? | Tables: app_all -> app_id. app_events -> event_id, app_id, is_installed, is_active. app_events_relevant -> event_id, app_id, is_installed, is_active. app_labels -> app...
what is the difference between the events of device number -9222956879900150000 that can be located and those that are unable to be located?
talkingdata
select device_id from gender_age where gender = 'f' limit 3
Question: please list any three devices that are owned by female users. | Tables: app_all -> app_id. app_events -> event_id, app_id, is_installed, is_active. app_events_relevant -> event_id, app_id, is_installed, is_active. app_labels -> app_id, label_id. events -> event_id, device_id, timestamp, longitude, latitude. e...
please list any three devices that are owned by female users.
talkingdata
select category, label_id from label_categories where category like '%game%' limit 5
Question: please list any five app categories that are related to games, along with their label id. | Tables: app_all -> app_id. app_events -> event_id, app_id, is_installed, is_active. app_events_relevant -> event_id, app_id, is_installed, is_active. app_labels -> app_id, label_id. events -> event_id, device_id, times...
please list any five app categories that are related to games, along with their label id.
talkingdata
select device_model from phone_brand_device_model2 where phone_brand = 'oppo' limit 3
Question: please list any three oppo device models. | Tables: app_all -> app_id. app_events -> event_id, app_id, is_installed, is_active. app_events_relevant -> event_id, app_id, is_installed, is_active. app_labels -> app_id, label_id. events -> event_id, device_id, timestamp, longitude, latitude. events_relevant -> ev...
please list any three oppo device models.
talkingdata
select sum(iif(is_installed = 1 and is_active = 0, 1, 0)) / count(app_id) as perrcent from app_events where event_id = 6
Question: what is the percentage of users who experienced event number 6 who have the app installed but do not use the app? | Tables: app_all -> app_id. app_events -> event_id, app_id, is_installed, is_active. app_events_relevant -> event_id, app_id, is_installed, is_active. app_labels -> app_id, label_id. events -> ev...
what is the percentage of users who experienced event number 6 who have the app installed but do not use the app?
talkingdata
select iif(sum(iif(t1.gender = 'm', 1, 0)) - sum(iif(t1.gender = 'f', 1, 0)) > 0, 'm', 'f') as gender from gender_age as t1 inner join phone_brand_device_model2 as t2 on t1.device_id = t2.device_id where t2.device_model = 'galaxy note 2'
Question: which gender owned more of the galaxy note 2 device model? | Tables: app_all -> app_id. app_events -> event_id, app_id, is_installed, is_active. app_events_relevant -> event_id, app_id, is_installed, is_active. app_labels -> app_id, label_id. events -> event_id, device_id, timestamp, longitude, latitude. even...
which gender owned more of the galaxy note 2 device model?
talkingdata
select count(t1.app_id) as num from app_events as t1 inner join events as t2 on t1.event_id = t2.event_id where t1.event_id = 2 and t1.is_active = 1 group by t2.timestamp
Question: when did event number 2 happen and how many users were active? | Tables: app_all -> app_id. app_events -> event_id, app_id, is_installed, is_active. app_events_relevant -> event_id, app_id, is_installed, is_active. app_labels -> app_id, label_id. events -> event_id, device_id, timestamp, longitude, latitude. ...
when did event number 2 happen and how many users were active?
talkingdata
select t1.category from label_categories as t1 inner join app_labels as t2 on t1.label_id = t2.label_id where t2.app_id = 5902120154267990000
Question: which behavior category does user number 5902120154267990000 belong to? | Tables: app_all -> app_id. app_events -> event_id, app_id, is_installed, is_active. app_events_relevant -> event_id, app_id, is_installed, is_active. app_labels -> app_id, label_id. events -> event_id, device_id, timestamp, longitude, l...
which behavior category does user number 5902120154267990000 belong to?
talkingdata
select count(t2.app_id) from label_categories as t1 inner join app_labels as t2 on t1.label_id = t2.label_id where t1.category = 'comics'
Question: how many users belong to the same behavior category as comics? | Tables: app_all -> app_id. app_events -> event_id, app_id, is_installed, is_active. app_events_relevant -> event_id, app_id, is_installed, is_active. app_labels -> app_id, label_id. events -> event_id, device_id, timestamp, longitude, latitude. ...
how many users belong to the same behavior category as comics?
talkingdata
select t1.age, t1.gender from gender_age as t1 inner join events_relevant as t2 on t1.device_id = t2.device_id where t1.device_id = 29182687948017100 and t2.event_id = 1
Question: what is the age and gender of the person who uses the device number 29182687948017100 on event number 1? | Tables: app_all -> app_id. app_events -> event_id, app_id, is_installed, is_active. app_events_relevant -> event_id, app_id, is_installed, is_active. app_labels -> app_id, label_id. events -> event_id, d...
what is the age and gender of the person who uses the device number 29182687948017100 on event number 1?
talkingdata
select count(t1.device_id) from gender_age as t1 inner join events_relevant as t2 on t1.device_id = t2.device_id where t2.longitude = 114 and t1.gender = 'm'
Question: how many male users have the log of events at the same longitude of 114? | Tables: app_all -> app_id. app_events -> event_id, app_id, is_installed, is_active. app_events_relevant -> event_id, app_id, is_installed, is_active. app_labels -> app_id, label_id. events -> event_id, device_id, timestamp, longitude, ...
how many male users have the log of events at the same longitude of 114?
talkingdata
select t1.timestamp from events_relevant as t1 inner join app_events as t2 on t1.event_id = t2.event_id where t2.app_id = -8022267440849930000 and t1.event_id = 7
Question: when did event number 7 happen for user number -8022267440849930000? | Tables: app_all -> app_id. app_events -> event_id, app_id, is_installed, is_active. app_events_relevant -> event_id, app_id, is_installed, is_active. app_labels -> app_id, label_id. events -> event_id, device_id, timestamp, longitude, lati...
when did event number 7 happen for user number -8022267440849930000?
talkingdata
select t3.category from app_all as t1 inner join app_labels as t2 on t1.app_id = t2.app_id inner join label_categories as t3 on t2.label_id = t3.label_id where t1.app_id = -9222198347540750000
Question: what are the behavior categories that user number -9222198347540750000 belongs to? | Tables: app_all -> app_id. app_events -> event_id, app_id, is_installed, is_active. app_events_relevant -> event_id, app_id, is_installed, is_active. app_labels -> app_id, label_id. events -> event_id, device_id, timestamp, l...
what are the behavior categories that user number -9222198347540750000 belongs to?
talkingdata
select t1.`group` from gender_age as t1 inner join phone_brand_device_model2 as t2 on t1.device_id = t2.device_id where t2.phone_brand = 'lg' and t2.device_model = 'nexus 4'
Question: please provide the age group of any lg nexus 4 device users. | Tables: app_all -> app_id. app_events -> event_id, app_id, is_installed, is_active. app_events_relevant -> event_id, app_id, is_installed, is_active. app_labels -> app_id, label_id. events -> event_id, device_id, timestamp, longitude, latitude. ev...
please provide the age group of any lg nexus 4 device users.
talkingdata
select t1.gender from gender_age as t1 inner join phone_brand_device_model2 as t2 on t1.device_id = t2.device_id where t2.device_model = 'desire 826' and t2.phone_brand = 'htc'
Question: please provide the gender of at least one user who owns an htc desire 826 device. | Tables: app_all -> app_id. app_events -> event_id, app_id, is_installed, is_active. app_events_relevant -> event_id, app_id, is_installed, is_active. app_labels -> app_id, label_id. events -> event_id, device_id, timestamp, lo...
please provide the gender of at least one user who owns an htc desire 826 device.
talkingdata
select sum(iif(t1.category = 'academic information', 1.0, 0)) / count(t2.app_id) as per from label_categories as t1 inner join app_labels as t2 on t1.label_id = t2.label_id
Question: what is the percentage of users who are in the same behavior category as 'academic information'? | Tables: app_all -> app_id. app_events -> event_id, app_id, is_installed, is_active. app_events_relevant -> event_id, app_id, is_installed, is_active. app_labels -> app_id, label_id. events -> event_id, device_id...
what is the percentage of users who are in the same behavior category as 'academic information'?
talkingdata
select sum(iif(t1.`group` = 'f27-28', 1, 0)) / count(t1.device_id) as per from gender_age as t1 inner join events_relevant as t2 on t1.device_id = t2.device_id where substr(t2.timestamp, 1, 10) = '2016-05-03'
Question: what is the percentage of device users in the f27-28 age group who experienced an event on the 3rd of may 2016? | Tables: app_all -> app_id. app_events -> event_id, app_id, is_installed, is_active. app_events_relevant -> event_id, app_id, is_installed, is_active. app_labels -> app_id, label_id. events -> even...
what is the percentage of device users in the f27-28 age group who experienced an event on the 3rd of may 2016?
talkingdata
select count(device_id) from phone_brand_device_model2 where phone_brand = 'oppo'
Question: how many oppo devices are there? | Tables: app_all -> app_id. app_events -> event_id, app_id, is_installed, is_active. app_events_relevant -> event_id, app_id, is_installed, is_active. app_labels -> app_id, label_id. events -> event_id, device_id, timestamp, longitude, latitude. events_relevant -> event_id, d...
how many oppo devices are there?
talkingdata
select t.num from ( select `group`, count(`group`) as num from gender_age group by `group` ) t
Question: what is the most common age group among all device users? | Tables: app_all -> app_id. app_events -> event_id, app_id, is_installed, is_active. app_events_relevant -> event_id, app_id, is_installed, is_active. app_labels -> app_id, label_id. events -> event_id, device_id, timestamp, longitude, latitude. event...
what is the most common age group among all device users?
talkingdata
select count(event_id) from events where device_id = 4069764298338760000
Question: how many events does the device '4069764298338760000' have? | Tables: app_all -> app_id. app_events -> event_id, app_id, is_installed, is_active. app_events_relevant -> event_id, app_id, is_installed, is_active. app_labels -> app_id, label_id. events -> event_id, device_id, timestamp, longitude, latitude. eve...
how many events does the device '4069764298338760000' have?
talkingdata
select count(t1.app_id) from app_labels as t1 inner join label_categories as t2 on t1.label_id = t2.label_id where t2.category = 'equity fund'
Question: how many of the apps belong in the 'equity fund' category? | Tables: app_all -> app_id. app_events -> event_id, app_id, is_installed, is_active. app_events_relevant -> event_id, app_id, is_installed, is_active. app_labels -> app_id, label_id. events -> event_id, device_id, timestamp, longitude, latitude. even...
how many of the apps belong in the 'equity fund' category?
talkingdata
select t2.longitude, t2.latitude from gender_age as t1 inner join events_relevant as t2 on t1.device_id = t2.device_id where t1.`group` = 'f24-26' and t1.gender = 'f'
Question: list all females aged 24 to 26 devices' locations. | Tables: app_all -> app_id. app_events -> event_id, app_id, is_installed, is_active. app_events_relevant -> event_id, app_id, is_installed, is_active. app_labels -> app_id, label_id. events -> event_id, device_id, timestamp, longitude, latitude. events_relev...
list all females aged 24 to 26 devices' locations.
talkingdata
select count(t1.device_id) from gender_age as t1 inner join phone_brand_device_model2 as t2 on t1.device_id = t2.device_id where t2.device_model = 'galaxy note 3' and t1.gender = 'm'
Question: how many male users have a galaxy note 3? | Tables: app_all -> app_id. app_events -> event_id, app_id, is_installed, is_active. app_events_relevant -> event_id, app_id, is_installed, is_active. app_labels -> app_id, label_id. events -> event_id, device_id, timestamp, longitude, latitude. events_relevant -> ev...
how many male users have a galaxy note 3?
talkingdata
select t1.phone_brand, t1.device_model from phone_brand_device_model2 as t1 inner join events_relevant as t2 on t1.device_id = t2.device_id where t2.timestamp = '2016-05-07 06:03:22'
Question: list all the devices' brands and models of events on 5/7/2016 at 6:03:22 am. | Tables: app_all -> app_id. app_events -> event_id, app_id, is_installed, is_active. app_events_relevant -> event_id, app_id, is_installed, is_active. app_labels -> app_id, label_id. events -> event_id, device_id, timestamp, longitu...
list all the devices' brands and models of events on 5/7/2016 at 6:03:22 am.
talkingdata
select t.phone_brand from ( select t2.phone_brand, count(t2.phone_brand) as num from gender_age as t1 inner join phone_brand_device_model2 as t2 on t1.device_id = t2.device_id where t1.age between 20 and 30 group by t2.phone_brand ) as t order by t.num desc limit 1
Question: which brand is most common among people in their twenties? | Tables: app_all -> app_id. app_events -> event_id, app_id, is_installed, is_active. app_events_relevant -> event_id, app_id, is_installed, is_active. app_labels -> app_id, label_id. events -> event_id, device_id, timestamp, longitude, latitude. even...
which brand is most common among people in their twenties?
talkingdata
select sum(iif(t1.gender is null and t1.age is null and t1.`group` is null, 1, 0)) / count(t1.device_id) as per from gender_age as t1 inner join phone_brand_device_model2 as t2 on t1.device_id = t2.device_id where t2.phone_brand = 'vivo'
Question: what percentage of vivo devices belong to users with no information? | Tables: app_all -> app_id. app_events -> event_id, app_id, is_installed, is_active. app_events_relevant -> event_id, app_id, is_installed, is_active. app_labels -> app_id, label_id. events -> event_id, device_id, timestamp, longitude, lati...
what percentage of vivo devices belong to users with no information?
law_episode
select t2.keyword from episode as t1 inner join keyword as t2 on t1.episode_id = t2.episode_id where t1.title = 'refuge: part 1'
Question: please list all the keywords of the episode 'refuge: part 1'. | Tables: Episode -> episode_id, series, season, episode, number_in_series, title, summary, air_date, episode_image, rating, votes. Keyword -> episode_id, keyword. Person -> person_id, name, birthdate, birth_name, birth_place, birth_region, birth_c...
please list all the keywords of the episode 'refuge: part 1'.
law_episode
select count(t2.keyword) from episode as t1 inner join keyword as t2 on t1.episode_id = t2.episode_id where t1.season = 9 and t1.episode = 23
Question: how many keywords are there for season 9, episode 23 of law_and_order? | Tables: Episode -> episode_id, series, season, episode, number_in_series, title, summary, air_date, episode_image, rating, votes. Keyword -> episode_id, keyword. Person -> person_id, name, birthdate, birth_name, birth_place, birth_region...
how many keywords are there for season 9, episode 23 of law_and_order?
law_episode
select t1.title from episode as t1 inner join keyword as t2 on t1.episode_id = t2.episode_id where t2.keyword = 'laundering money'
Question: what is the title of the episode with the keyword 'laundering money'? | Tables: Episode -> episode_id, series, season, episode, number_in_series, title, summary, air_date, episode_image, rating, votes. Keyword -> episode_id, keyword. Person -> person_id, name, birthdate, birth_name, birth_place, birth_region,...
what is the title of the episode with the keyword 'laundering money'?
law_episode
select t2.keyword from episode as t1 inner join keyword as t2 on t1.episode_id = t2.episode_id where t1.rating > 8
Question: please list all the keywords for the episodes with a rating of over 8. | Tables: Episode -> episode_id, series, season, episode, number_in_series, title, summary, air_date, episode_image, rating, votes. Keyword -> episode_id, keyword. Person -> person_id, name, birthdate, birth_name, birth_place, birth_region...
please list all the keywords for the episodes with a rating of over 8.
law_episode
select t2.votes from episode as t1 inner join vote as t2 on t1.episode_id = t2.episode_id where t1.title = 'cherished' and t2.stars = 10
Question: how many 10-star votes were given to the episode titled 'cherished'? | Tables: Episode -> episode_id, series, season, episode, number_in_series, title, summary, air_date, episode_image, rating, votes. Keyword -> episode_id, keyword. Person -> person_id, name, birthdate, birth_name, birth_place, birth_region, ...
how many 10-star votes were given to the episode titled 'cherished'?
law_episode
select sum(t2.votes) from episode as t1 inner join vote as t2 on t1.episode_id = t2.episode_id where t1.title = 'cherished'
Question: how many votes did the episode titled 'cherished' get in total? | Tables: Episode -> episode_id, series, season, episode, number_in_series, title, summary, air_date, episode_image, rating, votes. Keyword -> episode_id, keyword. Person -> person_id, name, birthdate, birth_name, birth_place, birth_region, birth...
how many votes did the episode titled 'cherished' get in total?
law_episode
select t1.title from episode as t1 inner join vote as t2 on t1.episode_id = t2.episode_id where t2.stars = 10 order by t2.votes desc limit 1
Question: what is the title of the episode that got the most 10-star votes? | Tables: Episode -> episode_id, series, season, episode, number_in_series, title, summary, air_date, episode_image, rating, votes. Keyword -> episode_id, keyword. Person -> person_id, name, birthdate, birth_name, birth_place, birth_region, bir...
what is the title of the episode that got the most 10-star votes?
law_episode
select t2.role from episode as t1 inner join credit as t2 on t1.episode_id = t2.episode_id inner join person as t3 on t3.person_id = t2.person_id where t1.title = 'cherished' and t3.name = 'park dietz' and t2.credited = 'true'
Question: park dietz was credited in which role in the episode titled 'cherished'? | Tables: Episode -> episode_id, series, season, episode, number_in_series, title, summary, air_date, episode_image, rating, votes. Keyword -> episode_id, keyword. Person -> person_id, name, birthdate, birth_name, birth_place, birth_regi...
park dietz was credited in which role in the episode titled 'cherished'?
law_episode
select count(t1.episode_id) from episode as t1 inner join credit as t2 on t1.episode_id = t2.episode_id where t1.title = 'cherished' and t2.credited = 'false'
Question: how many people had filled a role in the episode titled 'cherished', but did not show up in the on-screen credits? | Tables: Episode -> episode_id, series, season, episode, number_in_series, title, summary, air_date, episode_image, rating, votes. Keyword -> episode_id, keyword. Person -> person_id, name, birt...
how many people had filled a role in the episode titled 'cherished', but did not show up in the on-screen credits?
law_episode
select t3.name from episode as t1 inner join credit as t2 on t1.episode_id = t2.episode_id inner join person as t3 on t3.person_id = t2.person_id where t1.title = 'cherished' and t2.credited = 'true' and t2.role = 'technical advisor'
Question: who was credited as 'technical advisor' in the episode titled 'cherished'? | Tables: Episode -> episode_id, series, season, episode, number_in_series, title, summary, air_date, episode_image, rating, votes. Keyword -> episode_id, keyword. Person -> person_id, name, birthdate, birth_name, birth_place, birth_re...
who was credited as 'technical advisor' in the episode titled 'cherished'?
law_episode
select count(t3.person_id) from episode as t1 inner join credit as t2 on t1.episode_id = t2.episode_id inner join person as t3 on t3.person_id = t2.person_id where t2.credited = 'true' and t3.name = 'park dietz'
Question: for how many times was park dietz credited? | Tables: Episode -> episode_id, series, season, episode, number_in_series, title, summary, air_date, episode_image, rating, votes. Keyword -> episode_id, keyword. Person -> person_id, name, birthdate, birth_name, birth_place, birth_region, birth_country, height_met...
for how many times was park dietz credited?
law_episode
select t1.title from episode as t1 inner join credit as t2 on t1.episode_id = t2.episode_id inner join person as t3 on t3.person_id = t2.person_id where t2.credited = 'true' and t3.name = 'park dietz'
Question: please list the titles of all the episodes in which park dietz was credited. | Tables: Episode -> episode_id, series, season, episode, number_in_series, title, summary, air_date, episode_image, rating, votes. Keyword -> episode_id, keyword. Person -> person_id, name, birthdate, birth_name, birth_place, birth_...
please list the titles of all the episodes in which park dietz was credited.
law_episode
select t1.credited from credit as t1 inner join person as t2 on t2.person_id = t1.person_id where t2.name = 'anthony azzara' and t1.episode_id = 'tt0629204'
Question: was anthony azzara's role in episode tt0629204 displayed in the credits at the end of the episode? | Tables: Episode -> episode_id, series, season, episode, number_in_series, title, summary, air_date, episode_image, rating, votes. Keyword -> episode_id, keyword. Person -> person_id, name, birthdate, birth_nam...
was anthony azzara's role in episode tt0629204 displayed in the credits at the end of the episode?
law_episode
select count(t2.keyword) from episode as t1 inner join keyword as t2 on t1.episode_id = t2.episode_id where t1.title = 'disciple'
Question: how many keywords are there in the episode disciple? | Tables: Episode -> episode_id, series, season, episode, number_in_series, title, summary, air_date, episode_image, rating, votes. Keyword -> episode_id, keyword. Person -> person_id, name, birthdate, birth_name, birth_place, birth_region, birth_country, h...
how many keywords are there in the episode disciple?
law_episode
select t2.title from vote as t1 inner join episode as t2 on t2.episode_id = t1.episode_id where t1.stars = 1 order by t1.votes desc limit 1
Question: which episode got the most 1 star votes? give its title. | Tables: Episode -> episode_id, series, season, episode, number_in_series, title, summary, air_date, episode_image, rating, votes. Keyword -> episode_id, keyword. Person -> person_id, name, birthdate, birth_name, birth_place, birth_region, birth_countr...
which episode got the most 1 star votes? give its title.
law_episode
select count(t2.award_id) from episode as t1 inner join award as t2 on t1.episode_id = t2.episode_id where t2.series = 'law and order' and t1.season = 9 and t1.episode = 20
Question: how many nominations did law and order season 9, episode 20 get? | Tables: Episode -> episode_id, series, season, episode, number_in_series, title, summary, air_date, episode_image, rating, votes. Keyword -> episode_id, keyword. Person -> person_id, name, birthdate, birth_name, birth_place, birth_region, birt...
how many nominations did law and order season 9, episode 20 get?
law_episode
select count(t2.role) from episode as t1 inner join credit as t2 on t1.episode_id = t2.episode_id where t1.series = 'law and order' and t1.season = 9 and t1.episode = 17 and t2.credited = 'true'
Question: for season 9, episode 17 of the show law and order, how many roles have been included in the credit? | Tables: Episode -> episode_id, series, season, episode, number_in_series, title, summary, air_date, episode_image, rating, votes. Keyword -> episode_id, keyword. Person -> person_id, name, birthdate, birth_n...
for season 9, episode 17 of the show law and order, how many roles have been included in the credit?
law_episode
select t1.summary from episode as t1 inner join award as t2 on t1.episode_id = t2.episode_id where t2.award_id = 296
Question: describe what happened in the episode of award no.296. | Tables: Episode -> episode_id, series, season, episode, number_in_series, title, summary, air_date, episode_image, rating, votes. Keyword -> episode_id, keyword. Person -> person_id, name, birthdate, birth_name, birth_place, birth_region, birth_country,...
describe what happened in the episode of award no.296.
law_episode
select t1.role from credit as t1 inner join person as t2 on t2.person_id = t1.person_id where t2.name = 'joseph blair'
Question: which role did joseph blair play in the show? | Tables: Episode -> episode_id, series, season, episode, number_in_series, title, summary, air_date, episode_image, rating, votes. Keyword -> episode_id, keyword. Person -> person_id, name, birthdate, birth_name, birth_place, birth_region, birth_country, height_m...
which role did joseph blair play in the show?
law_episode
select count(t2.award_id) from person as t1 inner join award as t2 on t1.person_id = t2.person_id where t1.name = 'rene balcer'
Question: how many awards has rene balcer been nominated for? | Tables: Episode -> episode_id, series, season, episode, number_in_series, title, summary, air_date, episode_image, rating, votes. Keyword -> episode_id, keyword. Person -> person_id, name, birthdate, birth_name, birth_place, birth_region, birth_country, he...
how many awards has rene balcer been nominated for?
law_episode
select t2.air_date from vote as t1 inner join episode as t2 on t2.episode_id = t1.episode_id group by t2.episode_id order by sum(t1.votes) desc limit 1
Question: for the episode with the most votes, give its air date. | Tables: Episode -> episode_id, series, season, episode, number_in_series, title, summary, air_date, episode_image, rating, votes. Keyword -> episode_id, keyword. Person -> person_id, name, birthdate, birth_name, birth_place, birth_region, birth_country...
for the episode with the most votes, give its air date.
law_episode
select t1.name from person as t1 inner join award as t2 on t1.person_id = t2.person_id where t2.award_id = 313
Question: who was nominated for award no.313? give the full name. | Tables: Episode -> episode_id, series, season, episode, number_in_series, title, summary, air_date, episode_image, rating, votes. Keyword -> episode_id, keyword. Person -> person_id, name, birthdate, birth_name, birth_place, birth_region, birth_country...
who was nominated for award no.313? give the full name.
law_episode
select count(t1.role) from credit as t1 inner join person as t2 on t2.person_id = t1.person_id where t2.name = 'j.k. simmons'
Question: how many episodes did j.k. simmons' role appear on the show? | Tables: Episode -> episode_id, series, season, episode, number_in_series, title, summary, air_date, episode_image, rating, votes. Keyword -> episode_id, keyword. Person -> person_id, name, birthdate, birth_name, birth_place, birth_region, birth_co...
how many episodes did j.k. simmons' role appear on the show?
law_episode
select t2.votes from episode as t1 inner join vote as t2 on t1.episode_id = t2.episode_id where t2.stars = 9 and t1.title = 'sideshow'
Question: display the number of 9-star votes the episode sideshow received. | Tables: Episode -> episode_id, series, season, episode, number_in_series, title, summary, air_date, episode_image, rating, votes. Keyword -> episode_id, keyword. Person -> person_id, name, birthdate, birth_name, birth_place, birth_region, bir...
display the number of 9-star votes the episode sideshow received.
law_episode
select cast(sum(case when t1.title = 'refuge: part 1' then 1 else 0 end) as real) / sum(case when t1.title = 'shield' then 1 else 0 end) from episode as t1 inner join keyword as t2 on t1.episode_id = t2.episode_id
Question: how many times is the number of keywords in 'refuge: part 1' episode than 'shield' episode? | Tables: Episode -> episode_id, series, season, episode, number_in_series, title, summary, air_date, episode_image, rating, votes. Keyword -> episode_id, keyword. Person -> person_id, name, birthdate, birth_name, birt...
how many times is the number of keywords in 'refuge: part 1' episode than 'shield' episode?
law_episode
select cast(count(t1.episode_id) as real) / (193 - 185 + 1) from credit as t1 inner join episode as t2 on t1.episode_id = t2.episode_id where t1.category = 'cast' and t1.credited = 'true' and t2.number_in_series between 185 and 193
Question: calculate the average number of cast members that appeared in the credit from the 185th to the 193rd episode. | Tables: Episode -> episode_id, series, season, episode, number_in_series, title, summary, air_date, episode_image, rating, votes. Keyword -> episode_id, keyword. Person -> person_id, name, birthdate...
calculate the average number of cast members that appeared in the credit from the 185th to the 193rd episode.
law_episode
select t2.name from credit as t1 inner join person as t2 on t2.person_id = t1.person_id where t1.credited = 'false' and t1.episode_id = 'tt0629391'
Question: what are the names of the person that were not credited at the end of episode tt0629391? | Tables: Episode -> episode_id, series, season, episode, number_in_series, title, summary, air_date, episode_image, rating, votes. Keyword -> episode_id, keyword. Person -> person_id, name, birthdate, birth_name, birth_p...
what are the names of the person that were not credited at the end of episode tt0629391?
law_episode
select count(t1.person_id) from person as t1 inner join award as t2 on t1.person_id = t2.person_id where t2.result = 'winner' group by t1.person_id having count(t2.award_id) >= 3
Question: how many people have won at least 3 awards? | Tables: Episode -> episode_id, series, season, episode, number_in_series, title, summary, air_date, episode_image, rating, votes. Keyword -> episode_id, keyword. Person -> person_id, name, birthdate, birth_name, birth_place, birth_region, birth_country, height_met...
how many people have won at least 3 awards?
law_episode
select t2.name from credit as t1 inner join person as t2 on t2.person_id = t1.person_id where t1.episode_id = 'tt0629204' and t1.role = 'script supervisor'
Question: who is the script supervisor of the series in episode tt0629204? | Tables: Episode -> episode_id, series, season, episode, number_in_series, title, summary, air_date, episode_image, rating, votes. Keyword -> episode_id, keyword. Person -> person_id, name, birthdate, birth_name, birth_place, birth_region, birt...
who is the script supervisor of the series in episode tt0629204?
law_episode
select count(t2.award_id) from person as t1 inner join award as t2 on t1.person_id = t2.person_id where t1.name = 'julia roberts' and t2.result = 'nominee'
Question: how many awards has julia roberts been nominated for? | Tables: Episode -> episode_id, series, season, episode, number_in_series, title, summary, air_date, episode_image, rating, votes. Keyword -> episode_id, keyword. Person -> person_id, name, birthdate, birth_name, birth_place, birth_region, birth_country, ...
how many awards has julia roberts been nominated for?
law_episode
select t2.name from credit as t1 inner join person as t2 on t2.person_id = t1.person_id where t1.role = 'camera operator' order by t2.height_meters desc limit 1
Question: who is the tallest camera operator? | Tables: Episode -> episode_id, series, season, episode, number_in_series, title, summary, air_date, episode_image, rating, votes. Keyword -> episode_id, keyword. Person -> person_id, name, birthdate, birth_name, birth_place, birth_region, birth_country, height_meters, nic...
who is the tallest camera operator?
law_episode
select count(t1.person_id) from person as t1 inner join award as t2 on t1.person_id = t2.person_id where t2.year = 1999 and t1.birth_country = 'canada'
Question: how many people, who were born in canada, won an award in 1999? | Tables: Episode -> episode_id, series, season, episode, number_in_series, title, summary, air_date, episode_image, rating, votes. Keyword -> episode_id, keyword. Person -> person_id, name, birthdate, birth_name, birth_place, birth_region, birth...
how many people, who were born in canada, won an award in 1999?
law_episode
select count(t1.episode_id) from episode as t1 inner join vote as t2 on t1.episode_id = t2.episode_id where t2.stars = 10
Question: how many people gave the most enjoyed episode a 10-star rating? | Tables: Episode -> episode_id, series, season, episode, number_in_series, title, summary, air_date, episode_image, rating, votes. Keyword -> episode_id, keyword. Person -> person_id, name, birthdate, birth_name, birth_place, birth_region, birth...
how many people gave the most enjoyed episode a 10-star rating?
law_episode
select t2.keyword from episode as t1 inner join keyword as t2 on t1.episode_id = t2.episode_id where t1.title = 'shield'
Question: what are the keywords of the 'shield' episode? | Tables: Episode -> episode_id, series, season, episode, number_in_series, title, summary, air_date, episode_image, rating, votes. Keyword -> episode_id, keyword. Person -> person_id, name, birthdate, birth_name, birth_place, birth_region, birth_country, height_...
what are the keywords of the 'shield' episode?
law_episode
select cast(sum(case when t2.stars = 1 then 1 else 0 end) as real) * 100 / count(t1.episode_id) from episode as t1 inner join vote as t2 on t1.episode_id = t2.episode_id where t1.title = 'true north' and t1.episode_id = 'tt0629477'
Question: what is the percentage of people who gave the 'true north' episode a 1-star rating? | Tables: Episode -> episode_id, series, season, episode, number_in_series, title, summary, air_date, episode_image, rating, votes. Keyword -> episode_id, keyword. Person -> person_id, name, birthdate, birth_name, birth_place,...
what is the percentage of people who gave the 'true north' episode a 1-star rating?
law_episode
select t1.title from episode as t1 inner join keyword as t2 on t1.episode_id = t2.episode_id group by t1.episode_id order by count(t2.keyword) desc limit 1
Question: what is the title of the episode with the highest number of keywords? | Tables: Episode -> episode_id, series, season, episode, number_in_series, title, summary, air_date, episode_image, rating, votes. Keyword -> episode_id, keyword. Person -> person_id, name, birthdate, birth_name, birth_place, birth_region,...
what is the title of the episode with the highest number of keywords?
law_episode
select count(t1.episode_id) from episode as t1 inner join award as t2 on t1.episode_id = t2.episode_id where strftime('%y', t1.air_date) = '1998' and t2.organization = 'international monitor awards' and t2.result = 'winner'
Question: among the episodes that were aired in 1998, how many won an international monitor awards? | Tables: Episode -> episode_id, series, season, episode, number_in_series, title, summary, air_date, episode_image, rating, votes. Keyword -> episode_id, keyword. Person -> person_id, name, birthdate, birth_name, birth_...
among the episodes that were aired in 1998, how many won an international monitor awards?
law_episode
select count(t2.award_id) from episode as t1 inner join award as t2 on t1.episode_id = t2.episode_id where t1.title = 'agony' and t2.result = 'winner'
Question: how many times did the episode titled 'agony' win an award? | Tables: Episode -> episode_id, series, season, episode, number_in_series, title, summary, air_date, episode_image, rating, votes. Keyword -> episode_id, keyword. Person -> person_id, name, birthdate, birth_name, birth_place, birth_region, birth_cou...
how many times did the episode titled 'agony' win an award?
law_episode
select sum(case when t2.season = 9 then 1 else 0 end) as num , cast(sum(case when t2.season = 9 then 1 else 0 end) as real) / count(t1.episode_id) from credit as t1 inner join episode as t2 on t1.episode_id = t2.episode_id where t1.category = 'cast' and t2.series = 'law and order'
Question: how many episodes are there in the 9th season of law and order? calculate the average number of casts per season of the said series. | Tables: Episode -> episode_id, series, season, episode, number_in_series, title, summary, air_date, episode_image, rating, votes. Keyword -> episode_id, keyword. Person -> per...
how many episodes are there in the 9th season of law and order? calculate the average number of casts per season of the said series.
law_episode
select t2.keyword from episode as t1 inner join keyword as t2 on t1.episode_id = t2.episode_id where t1.votes not in ( select max(t1.votes) from episode as t1 inner join keyword as t2 on t1.episode_id = t2.episode_id ) order by t1.votes desc limit 1
Question: what are the keywords of the episode which received the 2nd-highest number of votes? | Tables: Episode -> episode_id, series, season, episode, number_in_series, title, summary, air_date, episode_image, rating, votes. Keyword -> episode_id, keyword. Person -> person_id, name, birthdate, birth_name, birth_place...
what are the keywords of the episode which received the 2nd-highest number of votes?
law_episode
select count(t2.award) from episode as t1 inner join award as t2 on t1.episode_id = t2.episode_id where t1.title = 'agony' and t2.result = 'winner'
Question: how many awards did the 'agony' win? | Tables: Episode -> episode_id, series, season, episode, number_in_series, title, summary, air_date, episode_image, rating, votes. Keyword -> episode_id, keyword. Person -> person_id, name, birthdate, birth_name, birth_place, birth_region, birth_country, height_meters, ni...
how many awards did the 'agony' win?
law_episode
select t3.name from episode as t1 inner join credit as t2 on t1.episode_id = t2.episode_id inner join person as t3 on t3.person_id = t2.person_id where t1.title = 'flight' and t2.role = 'narrator'
Question: who is the narrator of the 'flight' episode? | Tables: Episode -> episode_id, series, season, episode, number_in_series, title, summary, air_date, episode_image, rating, votes. Keyword -> episode_id, keyword. Person -> person_id, name, birthdate, birth_name, birth_place, birth_region, birth_country, height_me...
who is the narrator of the 'flight' episode?
law_episode
select t2.organization from person as t1 inner join award as t2 on t1.person_id = t2.person_id where t1.name = 'constantine makris' and t2.result = 'winner' group by t2.organization order by count(t2.award_id) desc limit 1
Question: in which organization did constantine makris win the most awards? | Tables: Episode -> episode_id, series, season, episode, number_in_series, title, summary, air_date, episode_image, rating, votes. Keyword -> episode_id, keyword. Person -> person_id, name, birthdate, birth_name, birth_place, birth_region, bir...
in which organization did constantine makris win the most awards?
law_episode
select t3.name from episode as t1 inner join credit as t2 on t1.episode_id = t2.episode_id inner join person as t3 on t3.person_id = t2.person_id where t1.episode = 3 and t2.role = 'stunt coordinator'
Question: who is the stunt coordinator in episode 3? | Tables: Episode -> episode_id, series, season, episode, number_in_series, title, summary, air_date, episode_image, rating, votes. Keyword -> episode_id, keyword. Person -> person_id, name, birthdate, birth_name, birth_place, birth_region, birth_country, height_mete...
who is the stunt coordinator in episode 3?
law_episode
select count(t2.person_id) from episode as t1 inner join credit as t2 on t1.episode_id = t2.episode_id where t1.title = 'admissions' and t2.credited = 'false'
Question: how many people were not credited at the end of the 'admissions' episode? | Tables: Episode -> episode_id, series, season, episode, number_in_series, title, summary, air_date, episode_image, rating, votes. Keyword -> episode_id, keyword. Person -> person_id, name, birthdate, birth_name, birth_place, birth_reg...
how many people were not credited at the end of the 'admissions' episode?
law_episode
select t2.title from credit as t1 inner join episode as t2 on t1.episode_id = t2.episode_id where t1.category = 'art department' group by t2.episode_id order by count(t1.category) desc limit 1
Question: what is the title of the episode that has the highest number of crews in the art department? | Tables: Episode -> episode_id, series, season, episode, number_in_series, title, summary, air_date, episode_image, rating, votes. Keyword -> episode_id, keyword. Person -> person_id, name, birthdate, birth_name, bir...
what is the title of the episode that has the highest number of crews in the art department?
law_episode
select count(t1.role) from credit as t1 inner join person as t2 on t2.person_id = t1.person_id where t2.name = 'julia roberts'
Question: how many roles did julia roberts play in the series? | Tables: Episode -> episode_id, series, season, episode, number_in_series, title, summary, air_date, episode_image, rating, votes. Keyword -> episode_id, keyword. Person -> person_id, name, birthdate, birth_name, birth_place, birth_region, birth_country, h...
how many roles did julia roberts play in the series?
law_episode
select t2.title from vote as t1 inner join episode as t2 on t2.episode_id = t1.episode_id where t1.votes >= 30 and t1.stars = 10 order by t1.votes desc limit 3
Question: what are the titles of the top 3 episodes that received no less than 30 votes in its 10-star rating? | Tables: Episode -> episode_id, series, season, episode, number_in_series, title, summary, air_date, episode_image, rating, votes. Keyword -> episode_id, keyword. Person -> person_id, name, birthdate, birth_n...
what are the titles of the top 3 episodes that received no less than 30 votes in its 10-star rating?
law_episode
select t2.name from credit as t1 inner join person as t2 on t2.person_id = t1.person_id where t1.role = 'clerk' and t2.birthdate is not null order by t2.birthdate limit 1
Question: who is the youngest person to ever play a 'clerk' role in the series? | Tables: Episode -> episode_id, series, season, episode, number_in_series, title, summary, air_date, episode_image, rating, votes. Keyword -> episode_id, keyword. Person -> person_id, name, birthdate, birth_name, birth_place, birth_region,...
who is the youngest person to ever play a 'clerk' role in the series?
law_episode
select count(t1.episode_id) from episode as t1 inner join vote as t2 on t1.episode_id = t2.episode_id where t1.episode = 24 and t2.stars = 1
Question: how many people did not enjoy the finale episode? | Tables: Episode -> episode_id, series, season, episode, number_in_series, title, summary, air_date, episode_image, rating, votes. Keyword -> episode_id, keyword. Person -> person_id, name, birthdate, birth_name, birth_place, birth_region, birth_country, heig...
how many people did not enjoy the finale episode?
law_episode
select t2.name from credit as t1 inner join person as t2 on t2.person_id = t1.person_id where t1.category = 'cast'
Question: list the names of all the cast members in the series. | Tables: Episode -> episode_id, series, season, episode, number_in_series, title, summary, air_date, episode_image, rating, votes. Keyword -> episode_id, keyword. Person -> person_id, name, birthdate, birth_name, birth_place, birth_region, birth_country, ...
list the names of all the cast members in the series.
law_episode
select t2.person_id, cast(count(t2.person_id) as real) * 100 / ( select count(t2.person_id) as num from credit as t1 inner join person as t2 on t2.person_id = t1.person_id ) as per from credit as t1 inner join person as t2 on t2.person_id = t1.person_id group by t2.person_id order by count(t2.person_id) desc limit 1
Question: who is the person who appeared the most in the series? calculate in percentage how many times he or she appeared. | Tables: Episode -> episode_id, series, season, episode, number_in_series, title, summary, air_date, episode_image, rating, votes. Keyword -> episode_id, keyword. Person -> person_id, name, birth...
who is the person who appeared the most in the series? calculate in percentage how many times he or she appeared.
law_episode
select distinct episode_id from award where award_category = 'primetime emmy'
Question: which episodes of the law & order have been nominated for the primetime emmy awards? | Tables: Episode -> episode_id, series, season, episode, number_in_series, title, summary, air_date, episode_image, rating, votes. Keyword -> episode_id, keyword. Person -> person_id, name, birthdate, birth_name, birth_place...
which episodes of the law & order have been nominated for the primetime emmy awards?
law_episode
select count(award_id) from award where result = 'nominee'
Question: how many episodes have not won any law & order series awards? | Tables: Episode -> episode_id, series, season, episode, number_in_series, title, summary, air_date, episode_image, rating, votes. Keyword -> episode_id, keyword. Person -> person_id, name, birthdate, birth_name, birth_place, birth_region, birth_c...
how many episodes have not won any law & order series awards?
law_episode
select distinct role from credit where credited = 'false'
Question: what roles have not been credited at the end of the episodes? | Tables: Episode -> episode_id, series, season, episode, number_in_series, title, summary, air_date, episode_image, rating, votes. Keyword -> episode_id, keyword. Person -> person_id, name, birthdate, birth_name, birth_place, birth_region, birth_c...
what roles have not been credited at the end of the episodes?