{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

CIS336_lab_4_Solutions - FROM books-4 SELECT firstname...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
A. Lab #4 B. Lab Type:   Application  Server       Experimental C. Lab Title Simple Select Queries on Single Tables D. Date Developed: 10/15/2004      Lab Developer/Campus: William McClure, DeVry Dallas Date Revised: March 2007 Lab Reviser/Campus: William McClure E. Desired (Lab) Learning Outcome:  After completing the lab, students should be able to  successfully write SQL query statements to select and limit data from single tables.  F. Solution: /*********************************************** || CIS349 iOptimize lab #4 Solutions || First Created - October 2004 || Revised – March 2007 || || Problems and solutions based on the || JustLeeDatabase LeeBooks.sql adapted from || materials provided by Course Technology. ************************************************/ --1 SELECT distinct category FROM books; --2 SELECT title, pubid "Publisher ID" FROM books; --3 SELECT title, retail, (retail-cost) AS "Price Markup"
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: FROM books;--4 SELECT firstname, lastname, city FROM book_customer WHERE zip = 31206;--5 SELECT * FROM book_order Lab Solution WHERE orderdate < '02-APR-06';--6 SELECT * FROM book_order WHERE shipdate is null;--7 SELECT * FROM book_customer WHERE (state = 'FL' or state = 'NJ') AND referred is NULL ORDER BY lastname;--8 SELECT * FROM books WHERE category <> 'COMPUTER' AND retail <= 30.00;--9 SELECT * FROM author WHERE fname LIKE '%A' ORDER BY lname desc , fname;--10 SELECT * FROM book_order WHERE orderdate > '01-APR-2006' AND orderdate < '04-APR-2006';--11 SELECT * FROM book_order WHERE orderdate BETWEEN '02-APR-2006' AND '04-APR-2006';--12 SELECT title, pubid "Publisher ID", pubdate "Published" FROM books WHERE pubdate > '01-jan-2001' OR pubid = 4 ORDER BY pubid;--13 SELECT title, (retail-cost)/cost*100 "Markup %" FROM books;...
View Full Document

{[ snackBarMessage ]}