Tables:tv_show (id(pk), name, network_id(fk), rating) — for…
Tables:tv_show (id(pk), name, network_id(fk), rating) — foreign key references network(id)network (id(pk), name)– id, rating, and network_id columns are INT. name columns are VARCHAR.mysql> SELECT * from tv_show;+—-+—————-+————+——–+| id | name | network_id | rating |+—-+—————-+————+——–+| 1 | Raven’s Home | 10 | 3 || 2 | Friends | 30 | 3 || 3 | The Good Place | 30 | 3 || 4 | NCIS | 20 | 4 || 5 | Bluey | 10 | 4 || 6 | The Simpsons | 40 | 5 || 7 | Daria | 20 | 5 |+—-+—————-+————+——–+7 rows in set (0.00 sec)mysql> SELECT * FROM network;+—-+——–+| id | name |+—-+——–+| 10 | Disney || 20 | CBS || 30 | NBC || 40 | Fox |+—-+——–+4 rows in set (0.00 sec) Which network(s) does the following command return? If the command returns an empty set, please select only “empty set”. SELECT name FROM network WHERE id IN (SELECT network_id from tv_show WHERE rating = (SELECT MIN(rating) FROM tv_show));
Read Details