ASSIGNMENT 7 (2) - FROM SALESPERSON ORDER BY COMMPERCT ASC...

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:23 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 TOP 1 EMPFIRSTNAME , EMPNAME , TITLE FROM CUSTOMEREMPLOYEE WHERE CUSTOMEREMPLOYEE . CUSTNUM = 2198 ORDER BY TITLE DESC 1. 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, 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

Page1 / 2

ASSIGNMENT 7 (2) - FROM SALESPERSON ORDER BY COMMPERCT ASC...

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