You must use the Access database and create queries that will answer the request
ID: 3726449 • Letter: Y
Question
You must use the Access database and create queries that will answer the requests below.
You may use direct SQL to create the queries.
Question: Obtain the ISBN, title and author last names of all books that were not ordered ever.
We're NOT using Join or Join In functions. Just SELECT, FROM, WHERE, ORDER BY, and SORT BY Thanks!
Book Wrote Author Authorid AuthornD FrstName nitials Category AuthorRank OrderLine Order Customer OrderNo OrderRank ISEN CustomerName CustomerAddress Stato OrderDeliveryCate Quanbty PercentageOiscountExplanation / Answer
Answer is as follows:
SQL query without joins is as follows :
SELECT b.ISBN , b.TITLE, a.LastName FROM Book b, Author a WHERE (SELECT b.ISBN, b. TITLE , w.ISBN FROM Book b, Wrote w WHERE b.ISBN = w.ISBN) AND (SELECT a.LastName , w.AutorId FROM Author a, Wrote w WHERE a.AuthorId = w.AuthorID) AND (SELECT b.ISBN , o.OrderNum FROM Book b, OrderLine Where b.ISBN = o.ISBN AND o.OrderNum = "NULL") ;
First Select Statement fetch ISBN , Title of book and last name of author
Second Select Statement get only ISBN and Title by Book and wrote tables
Third Select Statement get only Author by Author and Wrote table
Fourth Select statement is used to fetch where book is not orders yet so OrderNum is Null.
o is object of OrderLine
w is object of Wrote
a is object of Author
b is object of Book
if there is any query please ask in comments...
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.