0% found this document useful (0 votes)
48 views2 pages

Works - On Database: 1. Create The Following Table As It Is: Using Basic Structured Query Language Try 1 LO2:-lo3

The document provides SQL queries to retrieve data from various tables. It includes queries to return project details with budgets over $100,000, works on records with hours less than 10 and responsibility of 'Manager', employees in a department ordered by descending salary, and departments ordered by ascending name. It also includes queries to return project name, hours worked and number for works on records with hours over 10, and project details for budgets under $50,000.

Uploaded by

bayush
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)
48 views2 pages

Works - On Database: 1. Create The Following Table As It Is: Using Basic Structured Query Language Try 1 LO2:-lo3

The document provides SQL queries to retrieve data from various tables. It includes queries to return project details with budgets over $100,000, works on records with hours less than 10 and responsibility of 'Manager', employees in a department ordered by descending salary, and departments ordered by ascending name. It also includes queries to return project name, hours worked and number for works on records with hours over 10, and project details for budgets under $50,000.

Uploaded by

bayush
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/ 2

WDDBA

UC
Module Title LO2 :-.Write SQL statements that use aggregation and filtering
Using Basic
lo3:-Write SQL statements that use functions
Structured
Query Language
Try 1

Works_On Database:
1. Create the following table as it is

emp (eno, ename, bdate, title, salary, dno)


proj (pno, pname, budget, dno)
dept (dno, dname, mgreno)
workson (eno, pno, resp, hours)

2. Write an SQL query that returns the project number and name for projects with a
budget greater than $100,000.

3. Write an SQL query that returns all works on records where hours worked is less than 10
and the responsibility is 'Manager'.

4. Write an SQL query that returns the employees (name only) in department 'Dno'
ordered by decreasing salary.

5. Write an SQL query that returns the departments (all fields) ordered by ascending
department name.

6. Write an SQL query that returns the project name, hours worked, and project number for
all works on records where hours > 10.

7. Write an SQL query that returns the project name, department name, and budget for all
projects with a budget < $50,000.

8. Write an SQL query that returns the employee numbers and salaries of all employees in
the 'Consulting' department ordered by descending salary.
1) Create table examination and insert the following data.

RegNo Name CC Phy Che Mat Cs sum City


101 Abdu C1 98 100 97 99 394 Hawasa
102 Banu C2 38 50 37 49 174 Hawsa
103 Chale C2 100 100 97 99 396 Mysuru
104 John C3 78 80 67 79 304 Arsi
105 Klem C1 88 80 91 79 338 hawasa
106 Rahel C2 100 98 97 79 374 Hawasa
107 Sisay C3 47 60 56 78 241 Arsi
108 Tilahun C3 33 34 77 28 172 Arasikere
109 Umar C2 100 98 97 79 374 Hassan
110 Vensia C3 47 60 56 78 241 Belur

1. COUNT(RegNo FROM EXAMINATION


2. Calculate AVG of (CS) FROM EXAMINATION
3. Calculate SUM of (Phy) FROM EXAMINATION
4. Calculate MAX (Phy) FROM EXAMINATION
5. Calculate MIN (Phy) FROM EXAMINATION

You might also like