ASSIGNMENT 7 - FROM SALESPERSON ORDER BY COMMPERCT ASC 6...

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

View Full Document Right Arrow Icon
Kristina Lister CGS 2545 00:00:24 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
Image of page 1

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

View Full Document Right Arrow Icon
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

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern