17. List the network names and the number of shows per network. Take a screenshot now and paste it here. 18. List the average number of episodes in the table shows. Take a screenshot now and paste it here. 19. List the name of the shows that have more episodes than the average number of episodes in the table shows. Use a subquery. Do not hardcode the average number (that you obtained in the previous question).
SQL
SQL stands for Structured Query Language, is a form of communication that uses queries structured in a specific format to store, manage & retrieve data from a relational database.
Queries
A query is a type of computer programming language that is used to retrieve data from a database. Databases are useful in a variety of ways. They enable the retrieval of records or parts of records, as well as the performance of various calculations prior to displaying the results. A search query is one type of query that many people perform several times per day. A search query is executed every time you use a search engine to find something. When you press the Enter key, the keywords are sent to the search engine, where they are processed by an algorithm that retrieves related results from the search index. Your query's results are displayed on a search engine results page, or SER.
![17. List the network names and the number of shows per network.
Take a screenshot now and paste it here.
18. List the average number of episodes in the table shows.
Take a screenshot now and paste it here.
19. List the name of the shows that have more episodes than the average number of episodes in the table shows.
Use a subquery. Do not hardcode the average number (that you obtained in the previous question).
Take a screenshot now and paste it here.](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F993de58a-2778-4b88-a613-cf3a42e4d67b%2Fc3b5c92d-13ed-432a-97c6-ca6da699b86f%2F56kfg8r_processed.png&w=3840&q=75)
![[mysql> select * from shows;
+--
| ID | Title
[+.
1 | Bluey
| 2 | Bobby's World
|
| Num_episodes | Country
| Start | End
| net_id |
2018 | NULL |
|
53 | Australia |
81 | USA
110 | Canada
136 | USA
77 | Canada
350 | USA
109 | USA
263 | USA
81 | Singapore |
685 | USA
65 | USA
31 | USA
76 | USA
105 | USA
113 | USA
1
3 | Caillou
4 | Doc McStuffins
|
1990 | 1998 |
1997 | 2010 |
5 |
7 |
4 |
|
2012| 2020 |
5 | Doki
6 | Family Guy
|
|
2013 | NULL |
1999 | NULL |
|
3
5 |
2013 | 2018 |
1999 | NULL|
2016 | NULL |
1989 | NULL|
7 | Sofia the First
8 | SpongeBob SquarePants
9 | The Loud House
| 10 | The Simpsons
| 11 | Chip 'n Dale
| 12 | The Little Mermaid
| 13 | Little Einsteins
15 | Daniel Tiger
| 16 | Handy Manny
4
6
6
|
1989 | 1990 |
|
2005 | 2009
2012 | NULL
2006 | 2013 |
5 |
4 |
2 |
4 |
1992
1994 |
8
4 |
+-.
15 rows in set (0.00 sec)
mysql> select * from networks;
+-
[] id | name
[|
2 | CBS
3 | Discovery Kids
4 | Disney
5| Fox
6 | Nickelodeon
7 | Teletoon
8| PBS
1| ABC Kids
+.
8 rows in set (0.00 sec)
[mysql> desc shows;
| Field
| Туре
| Null | Key | Default | Extra
| int(11)
| ID
[| Title
| Num_episodes | int(11)
| Country
[] Start
| End
| net_id
| auto_increment |
| NO
| varchar (80) | NO
| PRI | NULL
| NULL
| NULL
| NULL
| NULL
| NULL
MUL | NULL
| NO
|
| varchar (60) | NO
|
| int(11)
| int(11)
| int(11)
| NO
| YES
| YES
7 rows in set (0.00 sec)
mysql> desc networks;
| Field | Type
| Null | Key | Default | Extra
| id
| name
| auto_increment
|
| int(11)
| NO
PRI | NULL
| NULL
| varchar(20) | YES
|
2 rows in set (0.00 sec)](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F993de58a-2778-4b88-a613-cf3a42e4d67b%2Fc3b5c92d-13ed-432a-97c6-ca6da699b86f%2Fjj1y8pb_processed.png&w=3840&q=75)
![](/static/compass_v2/shared-icons/check-mark.png)
Trending now
This is a popular solution!
Step by step
Solved in 2 steps
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![C How to Program (8th Edition)](https://www.bartleby.com/isbn_cover_images/9780133976892/9780133976892_smallCoverImage.gif)
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781337627900/9781337627900_smallCoverImage.gif)
![Programmable Logic Controllers](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)