Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Imagine you are managing a database for a bookstore. The table book _ sales contains information about sales transactions. Each row represents a sale, including

Imagine you are managing a database for a bookstore. The table book_sales contains information about sales transactions. Each row represents a sale, including the book's title, the quantity sold, the sale date, and the total revenue generated. Your task is to write a query that retrieves the books that have a total quantity sold greater than 50 and an average revenue per book greater than $15.
The average Revenue generated should be rounded to two decimal places.
Output the results in descending order of average revenue per book.
Tables Schema as Below:
book_sales
columnName dataType
sale_id INT
book_title VARCHAR(255)
quantity_sold INT
sale_date DATE
total_revenue INT

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David Kroenke, David Auer, Scott Vandenberg, Robert Yoder

10th Edition

0137916787, 978-0137916788

More Books

Students also viewed these Databases questions

Question

LO4 Provide an overview of four challenges facing HR today.

Answered: 1 week ago