Question

Consider the following tables:
WORKS(Pname, Cname, Salary)
LIVES(Pname, Street, City)
LOCATED(Cname, City)
MANAGER(Pname, Mname)
Write a query in SQL for the following:
(i) List the names of the people who work for the company Wipro' along with the cities they live in.
(ii) Find the people who work for the company `Infosys' having salary greater than 50,000.
(iii) List the names of the people, along with the street and city addresses.
(iv) Find the persons whose salaries are more than that of all of the 'Oracle' employees.
(v) Find the names of the persons who do not work in `Infosys'.
Make suitable assumptions, if any

07 Aug 2023
Answer :
Word Count : 240

Assumption: For the purpose of these queries, I'll assume that the columns `Pname` in the tables `WORKS`, `LIVES`, and `MANAGER` refer to the person's name, `Cname` in the tables `WORKS` and `LOCATED` refer to the company name, and `Mname` in the `MANAGER` table refers to the manager's name.

________ ____ ________ _______ _________ _______ ___.
__________ _______ _______ ____ __________ __________ ______.
_____ __________ _________ __________ ____ _______ _________ _________ _____ ____ ______.
__________ _____ ________ ___ ____.
______ ____ ____ __________ ________ ______ _____ ______ ____ __________ _______ _______.
____ _______ ____ _____ ___ _____ __________ _____ __________ ______.
_____ _______ ________ ________ __________ ___ ______ __________ ________ ________.
_________ ________ ___ _____ _________ ______ ______ ______.
___ ______ ________ ____ _____ _____ _________ _________.
______ _________ ____ _________ __________ ________ _________ _______ _________ _________.
______ ______ ____ __________ ____ ________ __________ _____ ___ ________ ________ ________.
______ _________ __________ ___ ________ _______ _______ _______.
_______ ________ ___ ______ ______ ________ ____ ______ ___ _______ _____.
__________ ______ _____ ____ ________ _______ _________.
____ ____ _________ _____ ___ ______ _______ _____ _______ _____ _________.
___ __________ ___ _______ ____ ___ ____.
_________ __________ _____ ___ _______ _________.
___ ______ _________ ___ _______ _____ _____ ________ _______.
_________ ______ ________ _____ _______.
____ __________ __________ ____ __________ __________.
_____ ____ ___ ___ _____ _______ ____ ________ ________ ___.
__________ _______ ______ ___ _____ ____ ____.
___ ____ _____ ____ ___.
Get Full Answer on WhatsApp
IGNOU NEWS
Assignment Submission Last Date Extended Till 30 June 2026 Click Here★★★IGNOU June 2026 TEE Date Sheet Released Click Here★★★
Top
📞
Call Support Instant phone assistance Consider the following tables:WORKS(Pname, Cname, Salary)LIVES(Pna
→
🟢
WhatsApp Chat Fast live messaging
→
Email Us Business enquiries & support
→