- Write a query to find the top 3 film categories that generated the most sales.
- The order of your results doesn't matter.
Total sales by movie categories.
col_name | col_type -------------+---------- category | text total_sales | numeric
category ----------- Category 1 Category 2 Category 3
SELECT category FROM sales_by_film_category ORDER BY total_sales DESC LIMIT 3;
This query selects the "category" column from the "sales_by_film_category" table, which presumably contains data on the sales of films in different categories. The results are then sorted in descending order based on the "total_sales" column, which likely contains the total revenue generated by each category. Finally, the query limits the output to the top three categories with the highest total sales. This can be useful for identifying the most profitable film categories and making business decisions based on that information.
More SELECT, WHERE, AND, OR, ORDER BY, LIMIT questions
|212||Top issuing bank by category visa||hard||-|
|211||High spenders by issuer visa||easy||-|
|210||Issuer and merchant report visa||easy||-|
|200||Last week's absent students snap||medium||
|175||Employees' email account amazon||easy||
|152||Salary analysis dropbox||easy||
|126||Top 3 restaurants uber||hard||
|111||Second most popular product amazon||medium||
|92||Acceptance rate first week of 2021 spotify||easy||
|17||GROUCHO WILLIAMS’ actor_id||easy||
|16||Staff who live in Woodridge||easy||
|4||Staff without a profile image||easy||
|3||Top 5 shortest movies||easy||
|1||Top store for movie sales||easy||