Question: 1. Write SQL statements to display the book type and the number of books in each type. 2. Write SQL statement to list the book

1. Write SQL statements to display the book type and the number of books in each type.
2. Write SQL statement to list the book names and types that were rented before Dec-01- 2011.
3. List syntax and/or logic errors in SQL statements to create a BOOK table.
CREATE TABLE BOOK ( BID NUMBER(2,0), BNAME VARCHAR2(20) NOT NULL , PRICE NUMBER(5,2) CHECK (PRICE >= 0), TYPE VARCHAR2(20) CONSTRAINT BID_FK REFERENCES RENT);
Book Rent CID C1 C2 BID B1 B1 B1 B3 B3 B3 B5 B2 B4 B5 DATE 03-Jan-2011 05-Jan-2011 03-Jun-2011 05-May-2011 17-Aug-2011 04-Sep-2011 11-Oct-2011 13-Oct-2011 10-May-2011 10-Dec-2011 BID BNAME B1 B2 B3 PRICE 15.99 17.50 6.95 TYPE Fiction Biograplh Childrern Fiction Fiction Fiction 5 The Hel Steve Tobs 8 Diary of a Wimpy Kid C4 C5 C6 C5 C1 B4 B5 The Litigator 14.47 3 0 Unbrokern 13.50 C6
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
