human
Schema:
program (Program_ID, Name, Origin, Launch, Owner)
channel (Channel_ID, Name, Owner, Share_in_percent, Rating_in_percent)
broadcast (Channel_ID, Program_ID, Time_of_day)
broadcast_share (Channel_ID, Program_ID, Date, Share_in_percent)
Please answer with SQL.
assistant
Sure, I understand.
human
which program owners have programs in the morning and the night
assistant
SELECT t1.owner FROM program AS t1 JOIN broadcast AS t2 ON t1.program_id = t2.program_id WHERE t2.Time_of_day = 'Morning' INTERSECT SELECT t1.owner FROM program AS t1 JOIN broadcast AS t2 ON t1.program_id = t2.program_id WHERE t2.Time_of_day = 'Night';
human
what are the programs by Beijing television? | Did you want the program names by the owner Beijing television (BTV) | yes
assistant
SELECT name FROM program WHERE owner = 'Beijing Television ( BTV )';
human
when did kaku launch?
assistant
SELECT launch FROM program WHERE name = 'Kaku';
human
who is Toonmax owner? | Did you want the owner of the program named Toonmax? | yes
assistant
SELECT owner FROM program WHERE name = "Toonmax" ;