0% found this document useful (0 votes)
10 views30 pages

Student and Department Data Queries

The document outlines various SQL queries related to student, department, and course details, including listing student information, filtering by specific conditions, and performing aggregations. It also includes instructions for joins, subqueries, and set operations to manipulate and retrieve data from the database. Additionally, it mentions the submission details of a DBMS lab assignment by a student named Ayush Sharma.

Uploaded by

Task Master
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views30 pages

Student and Department Data Queries

The document outlines various SQL queries related to student, department, and course details, including listing student information, filtering by specific conditions, and performing aggregations. It also includes instructions for joins, subqueries, and set operations to manipulate and retrieve data from the database. Additionally, it mentions the submission details of a DBMS lab assignment by a student named Ayush Sharma.

Uploaded by

Task Master
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

1. LIST ALL THE STUDENT DETAILS ?

2. LIST ALL THE DEPARTMENT DETAILS ?


3. LIST ALL THE COURSES DETAILS ?

4. List f-name,l_name,fees, course, for all students ?


[Link] student name ,student id, department-id for all students and rename student id
as id of the students student_name as name of students department_id as
DEPARTMENT_ID ?
[Link] out the students fees with their names only ?

Where conditions
8. list the details about “AYUSH” from student table ?
9. list out the students who are in department 20 ?

[Link] out the student whose semester fees is 60000 and 100000 ?
[Link] out the student who are in department 10 and 20 ?

[Link] out the student who are not in department 10 and 30 ?


[Link] out the students whose name start with ‘S’ ?

14. list out the students whose name start with ‘S’ and end with ‘H’?
15. list out the students whose name length is 4 and start with s ?

16. list out the student who are in department 10 and having the fees more than 35000?
[Link] out the students who are notrecieving a scholarship ?

ORDER BY CLAUSE
[Link] OUT THE STUDENT ID AND STUDENT NAME IN ASCENDING ORDER BASED ON STUDENT ID ?
[Link] out the student id and student name based on fees in descending order ?

[Link] out the student details according to their student name in ascending order and
fees in descending order ?
21. list out the student details according to their student name in ascending order and
then on department id in descending order ?

Group by and having clause ?


[Link] many students who are in different department wise in the university ?
23. LIST OUT THE DEPARTMENT WISE MAXIMUM FEE,MINIMUM FEES AND AVERAGE FEES
OF THE STUDENT ?

24. LIST OUT THE COURSE WISE MAXIMUM FEE,MINIMUM FEES AND AVERAGE FEES OF
THE STUDENT ?
[Link] out the number of student joined in every month in ascending order ?

[Link] out the no of student for each month and year in ascending order based on the
year and month ?
[Link] out the department id having at least four student ?

28. how many students joined in July month ?


[Link] many students who are joined in July and September month ?

[Link] many students joined in 2021 year ?


[Link] MANY STUDENTS JOINED EACH MONTH IN 2021 ?

[Link] MANY STUDENT JOINED IN january 2021 ?


[Link] is the department id having greter than or equal to 1 students in august 2021 ?

SUB QUERIES
[Link] the student who got the maximum fees ?
[Link] the students who are in iips department ?

36. select the student who are as cr ?


[Link] the number of students in mtech in different department ?

[Link] the student fees by 10 % which are in mca course ?


[Link] thee students who are in bcom course from respective department ?

[Link] the 2 highest fees paid by student ?


41. display the N TH highest fees paid by student ?

[Link] the names of all the faculty whose salary is greater than the salary is more than the
faculty of department 2 ?
[Link] ALL FACULTY WHOSE SALARY IS GREATER THAN ANY OF THE FACULTY OF
DEPARTMENT 5 ?

44. list the department who have atleast one faculty ?

JOINS
[Link] JOINS
[Link] THE DATA OF FACULTY AND DEPARTMENT TABLE USING INNER JOIN ?

[Link] THE DATA OF STUDENT AND DEPARTMRNT TABLE USING INNER JOINS ?
[Link] JOINS
47. DISPLAY THE DATA OF FACULTY AND DEPARTMENT TABLE USING NATURAL JOIN ?

[Link] THE DATA OF STUDENT AND DEPARTMRNT TABLE USING NATURAL JOINS ?

[Link] EQUI JOIN ?


[Link] name and salary of the faculty who have salary more than the fees of
students ?

[Link] the unique student id and name of the students who have fees more than the
salary of any faculty ?
[Link] the name fees and student_id of the student whose fees is more than
course_fees ?

SELF JOINS
[Link] THE NAME OF FACULTY AND THEIR ASSISTANT WHICH ARE IN THE SAME
TABLE ?
[Link] THE NAME OF DEPARTMENTS WHO ARE NEARBY TO EACH OTHER FROM THE
DEPARTMENT TABLE ?

[Link] the class incharge who fulfills the duty of the cr when cr id absent ?
OUTER JOINS
[Link] the information of the faculty whose deprtment id is null and also whose
department id is not null ?

[Link] the information of departments in whose faculty id is null and those faculty id
is not null?

SET OPERATORS
[Link] the name of student and faculty fees, salary of student and faculty using union
set operator ?

[Link] the name fees and salary of student and faculty of department 101 by union all
set operator ?

DBMS LAB ASSIGNNMENT


SUBMITTED TO – NITIN NAGAR SIR
SUBMITTED BY – AYUSH SHARMA
ROLL NO – IC-2K21-23
SEMESTER – 3RD

Common questions

Powered by AI

Salary comparisons should consider factors such as differences in faculty roles, experience, responsibilities, and departmental budget constraints. Blind comparisons could lead to dissatisfaction or turnover if perceived as inequitable, necessitating a nuanced approach integrating context-specific data .

Organizing student data by the joining month and year reveals temporal patterns and peak periods for admissions, potentially reflecting the effectiveness of recruitment strategies or external factors such as academic calendars. It helps forecast future trends and adjust strategies for better resource allocation and targeted recruitment efforts .

Evaluating admissions data chronologically helps institutions optimize recruitment efforts, predict enrollment trends, and plan academic offerings and housing. This approach aids in creating responsive strategies that adapt to demographic shifts and market demands .

Differentiating data for students and faculties can highlight department-specific dynamics, showing how resources, such as salaries and fees, are allocated uniquely across these groups. This clarity supports tailored policy-making and financial planning within departments. Using UNION ALL ensures all records are included, maintaining comprehensive data representation .

Using INNER JOINs in querying databases allows for the combination of rows from the faculty and department tables where there is a match based on the specified condition, such as matching department IDs. This enables the retrieval of comprehensive data that includes details from both tables only where there is a relationship between them .

It's crucial to ensure the increase logic is applied only to the targeted group and does not affect other records. The update should be based on a precise condition, such as the course being 'MCA'. Confirm the new fees calculation for accuracy, and consider implications such as financial aid impact and student consent requirements .

Natural joins automatically create a join based on column names common to both tables, potentially simplifying queries but possibly leading to erroneous joins if similarly named columns have different meanings. Inner joins require explicit column matching, granting more control and clarity over the join conditions .

The UNION operator allows combining results from the 'student fees' and 'faculty salaries' queries into a single set, which is helpful for comparison or comprehensive analysis across both datasets. Caution must be taken to ensure that the selected columns are compatible in data type and structure, and duplicates are addressed if needed .

Compiling department-wise maximum, minimum, and average fees provides insights into the financial spectrum across departments, enabling the identification of disparities or economic stresses among students. This data drives better-informed decisions in fee structuring, scholarships, and funding allocations .

Identifying departments with at least four students impacts resource allocation including faculty assignment, classroom space, and budgeting for department-specific needs. It allows administration to plan for sufficient academic and support services, ensuring efficient department operations .

You might also like