Assignment 7 Answers - FROM SALESPERSON ORDER BY COMMPERCT ASC 6 SELECT TOP 1 SALESPERSON.SPNUM QUANTITY FROM SALESPERSON JOIN SALES

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

View Full Document Right Arrow Icon
Kristina Lister CGS 2545 00:00:22 Assignment 7 Answers Project Manual, Project 7.2 Part B: Queries 1-5 only 1. SELECT CUSTNAME, CUSTNUM FROM CUSTOMER WHERE HQCITY='New York' 2. SELECT SPNAME, SPFIRSTNAME FROM SALESPERSON ORDER BY SPNAME ASC 3. SELECT SPNAME, SPFIRSTNAME,COMMPERCT, SPTRACK, SPNUM, OFFNUM, MANAGER, YEARHIRE FROM SALESPERSON WHERE YEARHIRE>1995 4. SELECT SPNAME, SPFIRSTNAME,COMMPERCT, SPTRACK, SPNUM, OFFNUM, MANAGER, YEARHIRE FROM SALESPERSON WHERE YEARHIRE>=1995 5. SELECT TOP 3 PRODUCTNAME, QUANTITY, PRODUCT.PRODNUM FROM PRODUCT JOIN SALES ON (SALES.PRODNUM=PRODUCT.PRODNUM) Part C: Queries 1, 2, 3, 6 only. 1. SELECT TOP 1 SPNUM FROM SALES WHERE PRODNUM=16386 2. SELECT EMPFIRSTNAME, EMPNAME, TITLE FROM CUSTOMEREMPLOYEE WHERE CUSTNUM=2198 AND TITLE=('VP Sales') 3. SELECT TOP 1 COMMPERCT, SPNAME, SPFIRSTNAME
Background image of page 1

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

View Full DocumentRight 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 SALESPERSON ORDER BY COMMPERCT ASC 6. SELECT TOP 1 SALESPERSON.SPNUM, QUANTITY FROM SALESPERSON JOIN SALES ON(SALESPERSON.SPNUM=SALES.SPNUM) WHERE SALESPERSON.SPNUM=137 ORDER BY QUANTITY Project Manual, Project 7.3 Submit Part A: Queries 1,2, 5 1. SELECT QUANTITY, SPFIRSTNAME, SPNAME,PRODNUM FROM SALESPERSON JOIN SALES ON (SALES.SPNUM=SALESPERSON.SPNUM) ORDER BY SALES.QUANTITY ASC 2. SELECT CUSTOMER.CUSTNUM, CUSTOMER.CUSTNAME, SALESPERSON.SPFIRSTNAME, SALESPERSON.SPNAME, CUSTOMER.HQCITY FROM CUSTOMER JOIN SALESPERSON ON (CUSTOMER.SPNUM=SALESPERSON.SPNUM) ORDER BY CUSTOMER.CUSTNUM ASC 5. SELECT SALESPERSON.SPNAME, OFFICE.SIZE FROM SALESPERSON JOIN OFFICE ON (SALESPERSON.OFFNUM=OFFICE.OFFNUM) ORDER BY OFFICE.SIZE ASC...
View Full Document

This note was uploaded on 09/21/2011 for the course CGS 2545 taught by Professor Markllewellyn during the Summer '10 term at University of Central Florida.

Page1 / 2

Assignment 7 Answers - FROM SALESPERSON ORDER BY COMMPERCT ASC 6 SELECT TOP 1 SALESPERSON.SPNUM QUANTITY FROM SALESPERSON JOIN SALES

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online