Im having trouble on a homework question, im finding it difficult to understand the logic behind what to do.
Q: Write a query which will list the customer name and book title for the customer who has purchased the most expensive book.
Relational Schema Customer(CID, Name, Address)
Orders(Ordernum, CID, Order_date, Cardnum)
Orderlist(Ordernum, ISBN, Qty, Ship_date)
Book(ISBN, Title, Author, Qty_in_stock, Price)
this is my attempt:
rename(expensive,projection cid (orders) join Orderlist join (selection price < d.price ((book) cross-product Pd Book))
exp - projection price (Book)
projection name Customer join exp