0% found this document useful (0 votes)
7 views6 pages

DBMS

The document outlines a series of SQL queries related to a course table named 'minor'. It includes commands to display various information such as courses with zero lab fees, those offered by specific departments, and courses with certain credit values. The queries also address filtering and sorting data based on conditions like lab fees and course names.

Uploaded by

Neeraj Mittal
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)
7 views6 pages

DBMS

The document outlines a series of SQL queries related to a course table named 'minor'. It includes commands to display various information such as courses with zero lab fees, those offered by specific departments, and courses with certain credit values. The queries also address filtering and sorting data based on conditions like lab fees and course names.

Uploaded by

Neeraj Mittal
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
You are on page 1/ 6

Week -01

Table creation
Week-02
Q1. Display the entire course table.

Query - select * from minor;

Q2. Display all information about any course with a zero clabfee.

Query - select * from minor where clbfee=0.00;

Q3. Display all information about any course which is offered by the
philosophy department.

Query - select * from minor where cdept=”PHIL”;

Q4. Display all rows where the number of credits exceeds 3.


Query - select * from minor where cred>3;

Q5. Display all information about the RELATIONAL DATABASE course.

Query - select * from minor where name=”RELATIONAL DATABASE”;

Q6. Display the row for course number 18.

Query - select * from minor where cno =8;

Q7. Display all information about courses having cname values which
follow “HEDONISM” in alphabetic sequence.

Query- select * from minor where name=”HEDONISM” order by name


ASC;

Q8. Display the cno, cname, and cdept values (in that order) for every row
in the course table. 9.
Query – select distinct cdept from minor;

Q9. Select the cno, cdept, and clabfee values for every course with a
clabfee value less than $100.

Query- select cno,cdept,clbfee from minor where clbfee<100.00;

Q10.Display the course names of all CIS courses.

Query- select name from minor where cdept =”CIS”;

Q 11. Display every academic department which offers courses.

Query- select cdept from minor ;


Q 12. Display every academic department which offers courses. Do not
display duplicate values.

Query- select distinct cdept from minor ;

Q13.For each course with a lab fee less than $100, display the academic
department which offers the course and the number of awarded credits.

Query- select name, cdept, cred from minor where clbfee < 100;

Q14. Display the course number and name of every course which has a
lab fee over $100. Include a third column in the result table which shows
“EXPENSIVE” in each row.

Query- select cno,name,’EXPENSIVE’ as status from minor where


clbfee>100;

You might also like