Challenge: Most Popular Genre
Task
Swipe to start coding
Write a query to find the genre with the highest number of borrowings in the library. Use subqueries to aggregate borrowings by genre and then select the genre(s) with the maximum borrow count.
- Aggregate the number of borrowings for each genre.
- Identify the maximum borrow count among all genres.
- Return the genre(s) and their borrow count where the borrow count matches the maximum value.
Solution
Everything was clear?
Thanks for your feedback!
Section 3. Chapter 6
single
Ask AI
Ask AI
Ask anything or try one of the suggested questions to begin our chat
Suggested prompts:
Can you explain this in simpler terms?
What are the main points I should remember?
Can you give me an example?
Awesome!
Completion rate improved to 5.56
Challenge: Most Popular Genre
Swipe to show menu
Task
Swipe to start coding
Write a query to find the genre with the highest number of borrowings in the library. Use subqueries to aggregate borrowings by genre and then select the genre(s) with the maximum borrow count.
- Aggregate the number of borrowings for each genre.
- Identify the maximum borrow count among all genres.
- Return the genre(s) and their borrow count where the borrow count matches the maximum value.
Solution
Everything was clear?
Thanks for your feedback!
Section 3. Chapter 6
single