Question: what are the names of the channels that broadcast in both morning and night?
Schema: create table channel (name varchar, channel_id varchar, PRIMARY KEY (name)); create table broadcast (channel_id varchar, time_of_day varchar, PRIMARY KEY (channel_id))
SQL: select t1.name from channel as t1 join broadcast as t2 on t1.channel_id = t2.channel_id where t2.time_of_day = 'morning' intersect select t1.name from channel as t1 join broadcast as t2 on t1.channel_id = t2.channel_id where t2.time_of_day = 'night'