Question: Given the following schema, write the SQL statements for the following queries. Query 1) Show the name of the customer who has ordered at least
Given the following schema, write the SQL statements for the following queries.

Query 1) Show the name of the customer who has ordered at least one book written by Thomas.
Query 2) Show the name of the customer who has ordered at least a Fiction book or a Travel book and the book names.
Query 3) Show the name of each category and the cheapest price of the books in that category.
Suppliers (SupplierID, Company Name, Cont actLastName, ContactFirstName, Phone) Books (BookID. Title, nit-Price, Author, Unit-in-Stock, Supplier!D. . SubjectID) Subjects (SubjectID. CategoryName) OrderDetails (BookID. OrderID. Quantity) * * * Orders (OrderID, CustomerID. EmployeeID, OrderDate, ShippedDate, ShipperID) . Employees (EmploveeID, LastName, FirstName) * Shippers (ShipperID.ShpperName)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
