Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

STEP 1: Using the BOOKS and PUBLISHER tables, create a query using the tradition

ID: 3647734 • Letter: S

Question

STEP 1: Using the BOOKS and PUBLISHER tables, create a query using the traditional join method that will return a list containing the book title, publisher contact person, and publisher phone number for all publishers whose publisher name starts with an

Explanation / Answer

1. select b.title,p.contact,p.phone from publisher p,books b where p.pubid=b.pubid and p.name like 'R%'; 2. select firstname||' '||lastname as "Customer Name",order# XXXX BOOK_CUSTOMER natural join BOOK_ORDER order by customer#; 3. select bc.customer#,bc.firstname,bc.lastname,b.title from BOOK_CUSTOMER bc,BOOK_ORDER bo,ORDERITEMS o,BOOKS b where b.category='FITNESS' and b.isbn=o.isbn and o.order#=bo.order# XXX bo.customer#=bc.customer#; 4. select title,count(bookauthor.isbn) from books,bookauthor where bookauthor.isbn=books.isbn group by (bookauthor.isbn,title) having count(bookauthor.isbn)>1; 6. select bc.firstname||' '||bc.lastname as "Customer Name", bc.city from book_customer bc,book_order bo,orderitems o,books b where bc.customer#=bo.customer# and bo.order#=o.order# XXX o.isbn=b.isbn and b.retail=(select max(retail) from books); 7. select o.order#,to_char(bo.orderdate,'mm/dd/yyyy') as "Order Date",o.quantity,'$'||b.retail as "Retail" from orderitems o,book_order bo,books b where o.order#=bo.order# XXX o.isbn=b.isbn; 8. select bc.firstname||' '||bc.lastname,b.title,to_char(bo.orderdate,'mm/dd/yyyy') as "Order Date" from book_customer bc,book_order bo,books b,orderitems o,publisher p where bc.customer#=bo.customer# XXX bo.order#=o.order# XXX o.isbn=b.isbn and b.pubid=p.pubid and p.name='PRINTING IS US'; 9. select b.title,bo.orderdate,bo.order# XXXX books b,book_order bo,orderitems o where b.isbn=o.isbn(+) and o.order#=bo.order#(+) order by b.isbn; 11. update books set retail=retail*1.05 where pubid=(select pubid from publisher where name='PRINTING IS US'); 12. select firstname||' '||lastname as "Customer Name" from book_customer where firstname!='JORGE' and lastname!='PEREZ' and referred=(select referred from book_customer where firstname='JORGE' and lastname='PEREZ');