Você está na página 1de 7

DBMS

SQL
ASSIGNMENT 4
EXERCISE
– Work out the following queries using following tables:

– Table name: SOFTWARE

Field name Type Remarks


Name Varchar2(8) Prog. Name
Title Varchar2(15) Dev. Project name
Dev_in Varchar2(8) Lang. Developed in
Scost Number(7,2) S/W Cost
Ccost Number(5) Dev. Cost
Sold Number(3) No. of S/W sold

5/23/2019 Created and Compiled By Prof. Smruti Nanavaty 2


EXERCISE
– Table name: PROGRAMMER
Field name Type Remarks
Name Varchar2(8) Prog. Name
Addr Varchar2(15) Address of Programmer
DOB Date Date of Birth
DOJ Date Date of Joining
Sex Char(1) Male or Female
Prof1 Varchar2(8) Known Lang.
Prof2 Varchar2(8) Known Lang.
Salary Number(7,2) salary

5/23/2019 Created and Compiled By Prof. Smruti Nanavaty 3


EXERCISE
– Table name: Prog_studies

Field name Type Remarks


Name Varchar2(8) Prog. Name
Splace Varchar2(10) Study Place
Course Varchar2(7) Course studied
Ccost Number(7,2) Course cost

5/23/2019 Created and Compiled By Prof. Smruti Nanavaty 4


EXERCISE
1. What are the highest number of copies sold by a package?
2. How much revenue has been generated out of sale of packages developed in
oracle?
3. Display the names of all programmers who were born in the January Month.
4. Display the number of packages developed in Each language.
5. Display the number of male and female programmers.
6. Display the details of programmers who have less than a years experience.
7. Display the details of the programmers along with their study detalis.
8. Display the list of cities in which the programmers have either studied or are
staying.
9. Display course wise list of programmers.

5/23/2019 Created and Compiled By Prof. Smruti Nanavaty 5


EXERCISE
10. Find the addresses of programmers which are uncommon to any study
place of programmers.
11. Display the addresses of programmer which are common to the study
place of at least one programmer.
12. Display the programmer details along with the details of softwares
developed by them.
13. Display the titles of software developed by all programmers who stay in
mumbai.
14. Display the softwares developed by all MCA.
15. Display the date of birth of all programmers who have passed from
mumbai university.
16. Display the technical skills of all programmers who have more than 10
software copies sold.
17. Display the details of the programmers who are staying in the same city
where they have studied.

5/23/2019 Created and Compiled By Prof. Smruti Nanavaty 6


EXERCISE
18. Display the details of all programmers who have developed softwares VB ,
FOXPRO or C.
19. Display language wise software list.
20. Display the details of programmers along with the details of their study by
sorting the records in descending order of their fees.

5/23/2019 Created and Compiled By Prof. Smruti Nanavaty 7

Você também pode gostar