Happy learning!!!
Carry on....
You can also share your queries in this site. Use this Link to share your part with the visitors like you.
SQL Query collection: Set1 Set2 Set3 Set 4
Below is the Table Structure using which you have to form the queries:

1) Display THE NUMBER OF packages developed in EACH language.
Table Structure

Answer
2) Display THE NUMBER OF packages developed by EACH person.
Table Structure

Answer
FROM SOFTWARE
GROUP BY NAME
3) Display THE NUMBER OF male and female programmer.
Table Structure

Answer
FROM PROGRAMMER
GROUP BY SEX
4) Display THE COSTLIEST packages and HIGEST selling developed in EACH language.
Table Structure

Answer
SFROM SOFTWARE
GROUP BY DEV_IN
5) Display THE NUMBER OF people BORN in EACH YEAR.
SELECT TO_CHAR(DOB,YY) AS YEAR,COUNT(NAME) AS PRNO
FROM PROGRAMMER
GROUP BY TO_CHAR(DOB,YY)
Table Structure

Answer
6) Display THE NUMBER OF people JOINED in EACH YEAR.
Table Structure

Answer
FROM PROGRAMMER
GROUP BY TO_CHAR(DOJ,YY)
7) Display THE NUMBER OF people BORN in EACH MONTH.
Table Structure

Answer
GROUP BY SUBSTR(DOB,4,3)
8) Display THE NUMBER OF people JOINED in EACH MONTH.
Table Structure

Answer
FROM PROGRAMMER
GROUP BY SUBSTR(DOJ,4,3)
9) Display the language wise COUNTS of prof1.
Table Structure

Answer
FROM PROGRAMMER
GROUP BY PROF1
10) Display the language wise COUNTS of prof2.
Table Structure

Answer
FROM PROGRAMMER
GROUP BY PROF2
11) Display THE NUMBER OF people in EACH salary group.
Table Structure

Answer
FROM PROGRAMMER
GROUP BY SALARY
12) Display THE NUMBER OF people who studied in EACH institute.
Table Structure

Answer
FROM STUDIES
GROUP BY SPLACE
13) Display THE NUMBER OF people who studied in EACH course.
Table Structure

Answer
FROM STUDIES GROUP BY COURSE
14) Display the TOTAL development COST of the packages developed in EACH language.
Table Structure

Answer
FROM SOFTWARE
GROUP BY DEV_IN
15) Display the selling cost of the package developed in EACH language.
Table Structure

Answer
FROM SOFTWARE
GROUP BY DEV_IN
16) Display the cost of the package developed by EACH programmer.
Table Structure

Answer
FROM SOFTWARE
GROUP BY NAME
17) Display the sales values of the package developed in EACH programmer.
Table Structure

Answer
FROM SOFTWARE
GROUP BY NAME
18) Display the NUMBER of packages developed by EACH programmer.
Table Structure

Answer
FROM SOFTWARE
GROUP BY NAME
19) Display the sales COST of packages developed by EACH programmer language wise.
Table Structure

Answer
FROM SOFTWARE
GROUP BY DEV_IN
20) Display EACH programmers name, costliest package and cheapest packages developed by Him/Her.
Table Structure

Answer
FROM SOFTWARE
GROUP BY NAME
21) Display EACH language name with AVERAGE development cost, AVERAGE cost, selling cost and AVERAGE price per copy.
Table Structure

Answer
FROM SOFTWARE
GROUP BY DEV_IN
22) Display EACH institute name with NUMBER of courses, AVERAGE cost per course.
Table Structure

Answer
FROM STUDIES
GROUP BY SPLACE
23) Display EACH institute name with NUMBER of students.
Table Structure

Answer
FROM STUDIES
GROUP BY SPLACE
24) Display names of male and female programmers.
Table Structure

Answer
FROM PROGRAMMER
ORDER BY SEX
25) Display the programmers name and their packages.
Table Structure

Answer
FROM SOFTWARE
ORDER BY NAME
26) Display the NUMBER of packages in EACH language.
Table Structure

Answer
FROM SOFTWARE
GROUP BY DEV_IN
27) Display the NUMBER of packages in EACH language for which development cost is less than 1000.
Table Structure

Answer
FROM SOFTWARE
WHERE DCOST<1000 GROUP BY DEV_IN
28) Display the AVERAGE difference BETWEEN scost and dcost for EACH language.
Table Structure

Answer
FROM SOFTWARE
GROUP BY DEV_IN
29) Display the TOTAL scost, dcsot and amount TOBE recovered for EACH programmer for whose dcost HAS NOT YET BEEN recovered.
Table Structure

Answer
FROM SOFTWARE
GROUP BY NAME
HAVING SUM(DCOST)>SUM(SOLD*SCOST)
30) Display highest, lowest and average salaries for THOSE earning MORE than 2000.
Table Structure

Answer
FROM PROGRAMMER
WHERE SALARY > 2000
SQL Query collection: Set1 Set2 Set3 Set 4
Related Post:
and
- MOOC Research and Innovation
- PiAUISuite Update and Voicecommand v3 1
- Sign in to edx org with Google and Facebook and
- Throwing fireballs with the Kinect and Oculus Rift in Unity 3D
- IT Laws and Patents notes for BSc IT Mumbai University
- How To Bypass Megaupload Wait Time And Download At Maximum Speed !!!
- The rise of the Bots Robots Surgeons and Disruptive Technology
- The Computer Science Pipeline and Diversity Part 2 Some positive signs and looking towards the future
- Collection of SQL queries with Answer and Output Set 4
- Skill maps analytics and more with Google’s Course Builder 1 8
- Why Watson and Siri Are Not Real AI
- PPT Presentation on Memory Management in Winnows2000 and WindowsXP
- Moore’s Law Part 1 Brief history of Moores Law and current state
- Information sharing for more efficient network utilization and management
- A year and a bit with Inbox Zero
- Explore the history of Pop and Punk Jazz and Folk with the Music Timeline
- Tips on Choosing Apt Web Templates and Service Providers
- Remembering to forget
- See through the clouds with Earth Engine and Sentinel 1 Data
- Teaching machines to read between the lines and a new corpus with entity salience annotations
- The Computer Science Pipeline and Diversity Part 1 How did we get here
- Getting your fridge to order food for you with a RPi camera and a hacked up Instacart API
- Google’s Course Builder 1 9 improves instructor experience and takes Skill Maps to the next level
- Sudoku Linear Optimization and the Ten Cent Diet
answer
2
- The Computer Science Pipeline and Diversity Part 2 Some positive signs and looking towards the future
- A PPT Presentation on Web 2 0
- Text to Speech for low resource languages episode 2 Building a parametric voice
- Moore’s Law Part 2 More Moore and More than Moore
- Download Cool apple mac logo wallpaper for Desktop 2
- RPi Video Looper 2 0
- Medal of Honor 2 Heroes First Impressions
0 comments:
Post a Comment