Queries
Queries
QUERIES
1. Find out the selling cost AVG for packages developed in Pascal.
2. Display Names, Ages of all Programmers.
3. Display the Names of those who have done the DAP Course.
4. Display the Names and Date of Births of all Programmers Born in January.
5. What is the Highest Number of copies sold by a Package.
6. Display lowest course Fee.
7. How many programmers done the PGDCA Course?
8. How much revenue has been earned thru sales of Packages Developed in C.
9. Display the Details of the Software Developed by Ramesh.
10. How many Programmers Studied at Sabhari.
11. Display details of Packages whose sales crossed the 2000 Mark.
12. Display the Details of Packages for which Development Cost have been recovered.
13. What is the cost of the costliest software development in Basic.
14. How many Packages Developed in DBASE.
15. How many programmers studied in Pragathi.
16. How many Programmers Paid 5000 to 10000 for their course?
17. What is AVG Course Fee
18. Display the details of the Programmers Knowing C.
19. How many Programmers know either COBOL or PASCAL.
20. How many Programmers Dont know PASCAL and C
21. How old is the Oldest Male Programmer.
22. What is the AVG age of Female Programmers.
23. Calculate the Experience in Years for each Programmer and Display with their names
in Descending order.
24. Who are the Programmers who celebrate their Birthdays During the Current Month.
25. How many Female Programmers Are There.
26. What are the Languages studied by Male Programmers.
27. What is the AVG Salary.
28. How many people draw salary 2000 to 4000.
29. Display the details of those who dont know Clipper, COBOL or PASCAL.
30. Display the Cost of Package Developed By each Programmer.
31. Display the sales values of the Packages Developed by the each Programmer.
32. Display the Number of Packages sold by Each Programmer.
33. Display the sales cost of the packages Developed by each Programmer Language
wise.
2
34. Display each language name with AVG Development Cost, AVG Selling Cost and AVG
Price Per Copy.
35. Display each programmers name, costliest and cheapest Packages Developed by him
or her.
36. Display each institute name with number of Courses, Average Cost Per Course.
37. Display each institute Name with Number of Students.
38. Display Names of Male and Female Programmers. Gender also.
39. Display the Name of Programmers and Their Packages.
40. Display the Number of Packages in Each Language Except C and C++.
41. Display the Number of Packages in Each Language for which Development Cost is less
than 1000.
42. Display AVG Difference between SCOST, DCOST for Each Package.
43. Display the total SCOST, DCOST and amount to Be Recovered for each Programmer
for Those Whose Cost has not yet been Recovered.
44. Display Highest, Lowest and Average Salaries for those earning more than 2000.
45. Who is the Highest Paid C Programmers.
46. Who is the Highest Paid Female COBOL Programmer.
47. Display the names of the highest paid programmers for each Language.
48. Who is the least experienced Programmer.
49. Who is the most experienced male programmer knowing PASCAL.
50. Which Language is known by only one Programmer.
51. Who is the Above Programmer Referred in 50.
52. Who is the Youngest Programmer knowing DBASE.
53. Which Female Programmer earning more than 3000 does not know C, C++, ORACLE
or DBASE.
54. Which Institute has most number of Students.
55. What is the Costliest course.
56. Which course has been done by the most of the Students.
57. Which Institute conducts costliest course.
58. Display the name of the Institute and Course, which has below AVG course fee.
59. Display the names of the courses whose fees are within 1000 (+ or -) of the Average
Fee,
60. Which package has the Highest Development cost.
61. Which course has below AVG number of Students.
62. Which Package has the lowest selling cost.
63. Who Developed the Package that has sold the least number of copies.
64. Which language has used to develop the package, which has the highest sales
amount.
3
65. How many copies of package that has the least difference between development and
selling cost where sold.
66. Which is the costliest package developed in PASCAL.
67. Which language was used to develop the most number of Packages.
68. Which programmer has developed the highest number of Packages.
69. Who is the Author of the Costliest Package.
70. Display the names of the packages, which have sold less than the AVG number of
copies.
71. Who are the authors of the Packages, which have recovered more than double the
Development cost.
72. Display the programmer Name and the cheapest packages developed by them in each
language.
73. Display the language used by each programmer to develop the Highest Selling and
Lowest-selling package.
74. Who is the youngest male Programmer born in 1965.
75. Who is the oldest Female Programmer who joined in 1992.
76. In which year was the most number of Programmers born.
77. In which month did most number of programmers join.
78. In which language are most of the programmers proficient.
79. Who are the male programmers earning below the AVG salary of Female
Programmers.
80. Who are the Female Programmers earning more than the Highest Paid.
81. Which language has been stated as the prof by most of the Programmers.
82. Display the details of those who are drawing the same salary.
83. Display the details of the Software Developed by the Male Programmers Earning More
than 3000/-.
84. Display the details of the packages developed in Pascal by the Female Programmers.
85. Display the details of the Programmers who joined before 1990.
86. Display the details of the Software Developed in C By female programmers of Pragathi.
87. Display the number of packages, No. of Copies Sold and sales value of each
programmer institute wise.
88. Display the details of the software developed in DBASE by Male Programmers, who
belong to the institute in which most number of Programmers studied.
89. Display the details of the software Developed by the male programmers Born before
1965 and female programmers born after 1975.
90. Display the details of the software that has developed in the language which is neither
the first nor the second proficiency of the programmers.
91. Display the details of the software developed by the male students of sabhari.
4
92. Display the names of the programmers who have not developed any packages.
93. What is the total cost of the Software developed by the programmers of Apple.
94. Who are the programmers who joined on the same day.
95. Who are the programmers who have the same Prof2.
96. Display the total sales value of the software, institute wise.
97. In which institute does the person who developed the costliest package studied.
98. Which language listed in prof1,prof2 has not been used to develop any package.
99. How much does the person who developed the highest selling package earn and what
course did HE/SHE undergo.
100. How many months will it take for each programmer to recover the cost of the Course
underwent.
101. Which is the costliest package by a person with under 3 years experience.
102. What is the AVG salary for those Whose software sales is more than 50,000/-.
103. How many packages were developed by students, who studied in institute that charge
the lowest course fee.
104. How many packages were developed by the person who developed the cheapest
package, where did HE/SHE studied.
105. How many packages were developed by the female programmers earning more then
the highest paid male programmer.
106. How many packages are developed by the most experienced programmer form BDPS.
107. List the programmers (form the software table) and the institutes they studied.
108. List each PROF with the number of Programmers having that PROF and the number of
the packages in that PROF.
109. List the programmer names (from the programmer table) and No. Of Packages each
has developed.
5
TABLE NAME: STUDIES
PNAME INSTITUTE COURSE COURSE FEE
ANAND SABHARI PGDCA 4500
ALTAF COIT DCA 7200
JULIANA BDPS MCA 22000
KAMALA PRAGATHI DCA 5000
MARY SABHARI PGDCA 4500
NELSON PRAGATHI DAP 6200
PATRICK PRAGATHI DCAP 5200
QADIR APPLE HDCA 14000
RAMESH SABHARI PGDCA 4500
REBECCA BRILLIANT DCAP 11000
REMITHA BDPS DCS 6000
REVATHI SABHARI DAP 5000
VIJAYA BDPS DCA 48000
TABLE NAME: SOFTWARE
PNAME TITLE DEVELOPIN SCOST DCOST SOLD
MARY README CPP 300.00 1200 84
ANAND PARACHUTES BASIC 399.95 6000 43
ANAND VIDEO TITLING PASCAL 7500.00 16000 9
JULIANA INVENTORY COBOL 3000.00 3500 0
KAMALA PAYROLL PKG. DBASE 9000.00 20000 7
MARY FINANCIAL ACCT. ORACLE 18000.00 85000 4
MARY CODE GENERATOR C 4500.00 20000 23
PATTRICK README CPP 300.00 1200 84
QADIR BOMBS AWAY ASSEMBLY 750.00 3000 11
QADIR VACCINES C 1900.00 3100 21
RAMESH HOTEL MGMT. DBASE 13000.00 35000 4
RAMESH DEAD LEE PASCAL 599.95 4500 73
REMITHA PC UTILITIES C 725.00 5000 51
REMITHA TSR HELP PKG. ASSEMBLY 2500.00 6000 7
REVATHI HOSPITAL MGMT. PASCAL 1100.00 75000 2
VIJAYA TSR EDITOR C 900.00 700 6
TABLE NAME: PROGRAMMER
PNAME DOB DOJ GENDER PROF1 PROF2 SALARY
ANAND 12-APR-66 21-APR-92 M PASCAL BASIC 3200
ALTAF 02-JUL-64 13-NOV-90 M CLIPPER COBOL 2800
JULIANA 31-JAN-60 21-APR-90 F COBOL DBASE 3000
KAMALA 30-OCT-68 02-JAN-92 F C DBASE 2900
MARY 24-JUN-70 01-FEB-91 F CPP ORACLE 4500
NELSON 11-SEP-85 11-OCT-89 M COBOL DBASE 2500
PATTRICK 10-NOV-65 21-APR-90 M PASCAL CLIPPER 2800
QADIR 31-AUG-65 21-APR-91 M ASSEMBLY C 3000
RAMESH 03-MAY-67 28-FEB-91 M PASCAL DBASE 3200
REBECCA 01-JAN-67 01-DEC-90 F BASIC COBOL 2500
REMITHA 19-APR-70 20-APR-93 F C ASSEMBLY 3600
REVATHI 02-DEC-69 02-JAN-92 F PASCAL BASIC 3700
VIJAYA 14-DEC-65 02-MAY-92 F FOXPRO C 3500
`