1. Display the details of packages for which the development cost has been recovered.

SELECT * FROM SOFTWARE WHERE SCOST*SOLD >= DCOST;

  1. What is the price of costliest software developed in VB?

SELECT MAX(SCOST) FROM SOFTWARE GROUP BY DEVIN HAVING DEVIN = ‘VB’;

  1. How many packages were developed in Oracle ?

SELECT COUNT(*) FROM SOFTWARE WHERE DEVIN = ‘ORACLE’;

  1. How many programmers studied at PRAGATHI?

SELECT COUNT(*) FROM STUDIES WHERE SPLACE = ‘PRAGATHI’;

  1. How many programmers paid 10000 to 15000 for the course?

SELECT COUNT(*) FROM STUDIES WHERE CCOST BETWEEN 10000 AND 15000;

  1. What is the average course fee?

SELECT AVG(CCOST) FROM STUDIES;

  1. Display the details of programmers knowing C.

SELECT * FROM PROGRAMMER WHERE PROF1 = ‘C’ OR PROF2 = ‘C’;

  1. How many programmers know either C or Pascal?
  2. SELECT * FROM PROGRAMMER WHERE PROF1 IN (‘C’,’PASCAL’) OR PROF2 IN (‘C’,’PASCAL’);
Advertisements