SQL BINGO SOLUTION

Shruti jain
Jun 23, 2023

Q. What are the products that have been sold more than the average number of times? solve using sql

sql query

Solution:

solution of sql query

EXPLANATION:

This query will first group the num_sales by product_name. Then, it will calculate the number of times each product has been sold. Finally, it will filter the results to only include products that have been sold more than the average number of times.

The output of the query will be a table with two columns:

  • product_name: The name of the product.
  • num_sales: The number of times the product has been sold.

Here is an example of the output of the query:

This output shows that the products named “Product A”, “Product B”, and “Product C” have been sold more than the average number of times.

I hope this helps! Let me know if you have any other questions.

--

--