Schema: CREATE TABLE channel (name VARCHAR, channel_id VARCHAR); CREATE TABLE broadcast (channel_id VARCHAR, time_of_day VARCHAR)
Question: what are the names of the channels that broadcast in both morning and night?
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'