Case Study: Alumni Database

Case Study: Alumni Database

<p> THE UNIVERSITY OF TEXAS AT DALLAS SCHOOL OF MANAGEMENT MIS 6326: DATABASE MANAGEMENT SYSTEMS SPRING 2000</p><p>Solution Key for Practice SQL Problems (HW#6)</p><p>1. Display the names of all the suppliers. SELECT NAME FROM SUPPLIERS;</p><p>2. For each quotation, display the part number, the supplier number, and the price quoted by that supplier. SELECT PARTNO, SUPPNO, PRICE FROM QUOTATIONS;</p><p>3. Display the part number, price, and quantity-on-order for all quotations from supplier # 61. SELECT PARTNO, PRICE, QONORDER FROM QUOTATIONS WHERE SUPPNO=61;</p><p>4. Display the part number for all parts that have a quantity on hand of at least 1000. SELECT PARTNO FROM INVENTORY WHERE QONHAND>=1000;</p><p>5. Display part number, price quoted, delivery time, and quantity on order on all quotations from suppliers with supplier numbers 51, 53, or 57. SELECT PARTNO, PRICE, DELIVERY_TIME, QONORDER FROM QUOTATIONS WHERE SUPPNO IN (51, 53, 57);</p><p>6. Display all information on those suppliers whose names have the string 'Parts' in it. SELECT * FROM SUPPLIERS WHERE NAME LIKE '%PARTS%';</p><p>7. Display the part number, price quoted, and quantity on order for quotations from all suppliers on those parts for which supplier # 61 has quoted a price. SELECT PARTNO, PRICE, QONORDER FROM QUOTATIONS WHERE PARTNO IN ( SELECT PARTNO FROM QUOTATIONS WHERE SUPPNO=61);</p><p>8. Display the total cost for each part that has been ordered from 'Eagle Hardware'. Include the part number and delivery time associated with each part. SELECT PARTNO, DELIVERY_TIME, PRICE*QONORDER AS TOTAL_COST FROM QUOTATIONS, SUPPLIERS WHERE SUPPLIERS.SUPPNO=QUOTATIONS.SUPPNO AND SUPPLIERS.NAME='EAGLE HARDWARE';</p><p>9. Display the supplier number and part number for those parts whose total order cost is less than $50.00. SELECT SUPPNO, PARTNO FROM QUOTATIONS WHERE PRICE*QONORDER<50;</p><p>10. Display the total amount needed to pay for all the parts ordered from the supplier 'Titanic Parts'. SELECT SUM(PRICE*QONORDER) AS TOTAL_AMOUNT FROM QUOTATIONS, SUPPLIERS WHERE SUPPLIERS.SUPPNO=QUOTATIONS.SUPPNO AND SUPPLIER.NAME='TITANIC PARTS';</p>

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    1 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us