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

SQL Problems

The document contains a series of SQL queries that retrieve various data from a database. These queries focus on selecting project information, employee details, department data, and work hours based on specific conditions. The queries utilize joins and filters to organize the results according to different criteria such as budget, salary, and department names.

Uploaded by

hung0sao
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)
5 views2 pages

SQL Problems

The document contains a series of SQL queries that retrieve various data from a database. These queries focus on selecting project information, employee details, department data, and work hours based on specific conditions. The queries utilize joins and filters to organize the results according to different criteria such as budget, salary, and department names.

Uploaded by

hung0sao
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

Questions:

1) SELECT pno, pname


FROM proj
WHERE budget > 100000;

2) SELECT *
FROM workson
WHERE hours < 10
AND resp = 'Manager';

3) SELECT eno, ename


FROM emp
WHERE (title = 'EE' OR title = 'SA')
AND salary > 35000;

4) SELECT ename
FROM emp
WHERE dno = 'D1'
ORDER BY salary DESC;

5) SELECT *
FROM dept
ORDER BY dname ASC;

6) SELECT [Link], [Link], [Link]


FROM emp e
JOIN dept d
ON [Link] = [Link];

7) SELECT [Link], [Link], [Link]


FROM workson w
JOIN proj p
ON [Link] = [Link]
WHERE [Link] > 10;

8) SELECT [Link], [Link], [Link]


FROM proj p
JOIN dept d
ON [Link] = [Link]
WHERE [Link] < 50000;
9) SELECT [Link], [Link]
FROM emp e
JOIN dept d
ON [Link] = [Link]
WHERE [Link] = 'Consulting'
ORDER BY [Link] DESC;

10) SELECT [Link], [Link], [Link], [Link]


FROM workson w
JOIN emp e
ON [Link] = [Link]
JOIN proj p
ON [Link] = [Link];

You might also like