Professional Documents
Culture Documents
Et22btco038 1
Et22btco038 1
. Find the names of all employees who work for Union Bank.
1
->
SELECT EMPNAME
FROM WORKS
WHERE compname='UNION';
3. Find the names and cities of residence of all employees who work
for Axis Bank.
->
SELECT EMPLOYEE1.EMPNAME,EMPLOYEE1.CITY
FROM EMPLOYEE1
INNER JOIN WORKS
ON EMPLOYEE1.EMPNAME=WORKS.EMPNAME
WHERE COMPNAME='AXIS';
4. Find the names, street addresses, and cities of residence of all
employees who work for Punjab Bank and earn more than 10000.
->
SELECT EMPLOYEE1.EMPNAME,EMPLOYEE1.STREET,employee1.CITY
FROM EMPLOYEE1
INNER JOIN WORKS
ON EMPLOYEE1.EMPNAME=WORKS.EMPNAME
WHERE COMPNAME='PANJAB' AND SALARY>10000;
5. Find all employees who live in the same cities as the companies
for which they work.
->
SELECT EMPLOYEE1.EMPNAME
FROM EMPLOYEE1
INNER JOIN COMPANY1
ON EMPLOYEE1.CITY=COMPANY1.CITY
WHERE EMPLOYEE1.CITY=COMPANY1.CITY;
6 .Find the name of employees whose name who have ‘s’ at any
position in their names.
->
SELECT EMPNAME
FROM EMPLOYEE1
WHERE EMPNAME LIKE '%S%';
Input :
Output :