QUERIES :

 

  1. Find out the selling cost average for packages developed in Oracle.

       SELECT AVG(SCOST)  FROM SOFTWARE WHERE DEVIN = ‘ORACLE’;

  1. Display the names, ages and experience of all programmers.

    SELECT PNAME,TRUNC(MONTHS_BETWEEN(SYSDATE,DOB)/12) “AGE”, TRUNC(MONTHS_BETWEEN(SYSDATE,DOJ)/12) “EXPERIENCE” FROM PROGRAMMER;

  1. Display the names of those who have done the PGDCA course.

SELECT PNAME FROM STUDIES WHERE COURSE = ‘PGDCA’;

  1. What is the highest number of copies sold by a package?

SELECT MAX(SOLD) FROM SOFTWARE;

  1. Display the names and date of birth of all programmers born in April.

SELECT PNAME, DOB FROM PROGRAMMER WHERE DOB LIKE ‘%APR%’;

  1. Display the lowest course fee.

SELECT MIN(CCOST) FROM STUDIES;

  1. How many programmers have done the DCA course.

SELECT COUNT(*) FROM STUDIES WHERE COURSE = ‘DCA’;

  1. How much revenue has been earned through the sale of packages developed in C.

SELECT SUM(SCOST*SOLD-DCOST) FROM SOFTWARE GROUP BY DEVIN HAVING DEVIN = ‘C’;

  1. Display the details of software developed by Rakesh.

SELECT * FROM SOFTWARE WHERE PNAME = ‘RAKESH’;

  1. How many programmers studied at Pentafour.

SELECT * FROM STUDIES WHERE SPLACE = ‘PENTAFOUR’;

  1. Display the details of packages whose sales crossed the 5000 mark.

SELECT * FROM SOFTWARE WHERE SCOST*SOLD-DCOST > 5000;

  1. Find out the number of copies which should be sold in order to recover the development cost of each package.

SELECT CEIL(DCOST/SCOST) FROM SOFTWARE;

Advertisements