Answer the following questions using sql. For each pc, list the tag number and computer id



Download 4.15 Kb.
Date conversion04.02.2017
Size4.15 Kb.
Answer the following questions using SQL.


  1. For each PC, list the tag number and computer ID.

Select Tagnum, COmpID from PC;

  1. Find the average software cost of Words and more

Select ave(softcost) from software where packname = “words & more”;

  1. Find the average software cost of all packages.

Select ave(softcost) from software;

  1. Who uses PCB121?

Select empname from employee where compid=”B121”;

  1. Display the package name of all word processing packages.

Select Packname from package;

  1. Display the package name of all packages whose cost is greater than the average package cost.

Select packname from package where packcost > ave(packcost);

7. Display the package name of all packages whose cost is less than the average package cost.



Select packname from package where packcost < ave(packcost);

  1. What will the following SQL statements do? Write a descriptive answer, not the data.




  1. Select * from PC;

Display everything in the PC table

  1. Select * from PC order by Empnum;

Display everything in the PC table arranged alphabetically by empnum

  1. Select Ave(PackCost) from package;

Display the average package cost.


The database is protected by copyright ©dentisty.org 2016
send message

    Main page