Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This quetion is about mysql statement. Q. .List all the sales books that are above the average. i tried these two statement but, doesn't work

image text in transcribed

image text in transcribed

This quetion is about mysql statement.

Q. .List all the sales books that are above the average.

i tried these two statement but, doesn't work

SELECT B.booktitle, B.isbn, B. Publisher, S.sellingPrice AS "Price"

FROM bookdb B , salesdb S

WHERE B.postingID = S.postingID

AND S.sellingPrice > (SELECT AVG(S.sellingPrice) FROM (SELECT S.sellingPrice FROM salesdb) S)

OR

SELECT B.booktitle, B.isbn, B. Publisher, S.sellingPrice AS "Price"

FROM bookdb AS B , salesdb AS S

WHERE B.postingID = S.postingID

AND S.sellingPrice > (SELECT AVG(S.sellingPrice) FROM (SELECT S.sellingPrice FROM salesdb) S)

plz give me the answer about the question. also plz check if yours work or not!! Thanks.

phpMyAdmin server Local Databases-B Database: vtbookbase T Browse Structure LPSQL Search ent Favorites postingID sellingPrice | @. O dp EditCopy Delete Edit Copy Delete O Edit Copy Delete Edit 3 Copy Delete i? Edit Copy Delete Edit Copy Delete O Edit Copy Delete Edit Copy Delete i? Edit Copy Delete Edit Copy Delete O Edit Copy Delete Edit 3 Copy Delete i? Edit Copy Delete Edit Copy Delete O Edit Copy Delete Edit Copy Delete i? Edit Copy Delete Edit Copy Delete O Edit Copy Delete Edit Copy Delete i? Edit Copy Delete Edit Copy Delete 2 15.0000 3 50.0000 6 40.0000 7 45.0000 9 40.0000 10 38.0000 11 30.0000 14 35.0000 5 37.0000 17 18.0000 19 30.0000 20 50.0000 21 50.0000 24 60.0000 25 40.0000 26 28.0000 27 34.0000 28 40.0000 29 60.0000 31 50.0000 2 45.0000 33 65.0000 New class information_schema mysql performance schema sys test vt_bookbase op op New buye owner rentaldb op trans renter salesdb salestrans op user op op

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

Spatial Databases A Tour

Authors: Shashi Shekhar, Sanjay Chawla

1st Edition

0130174807, 978-0130174802

More Books

Students also viewed these Databases questions