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.

(i) List the names of the people who work for the company 'Wipro' along with the cities they live in:

`SELECT W.Pname,

_____ __________ ________ _________ _________ ________ ______ _____ ___ ________ ___ __________.
___ _____ _____ ____ ___ ___ __________ _____ _________ ___ __________ ________.
_________ ___ __________ _________ _________ _____ _____.
_____ __________ ____ ______ _______ _______ _________ ________.
__________ ______ __________ _________ __________ _____ _______ ____ ___ _____ _________.
________ ____ _________ __________ ____ __________ ___ __________ _______ ____ ________ _________.
_____ ___ _______ _________ _____ __________ _______ ____ ______ ____ ____ ________.
___ _______ ____ _______ ____ __________ __________ ______ _________.
__________ __________ _______ __________ ________ ______.
________ ____ _______ ___ _______ ____ ____ ___ _____.
___ ________ ___ ______ __________ ________ __________ _____ _____ ____.
_______ ____ _____ _________ __________ ___.
_________ _________ _________ _____ _________ _____ ________ _________ _______.
___ _________ ____ ___ _________ ___ _______ ______ ____ __________ ____.
______ ______ _______ _______ ______ ____ ___.
____ ____ _______ ________ __________ ______ ________ _____ __________.
________ _________ _________ _________ ___.
_______ _____ ______ _____ ______ ___ ___.
____ _____ __________ ______ ____ ______ ____.
_____.
IGNOU ACADEMY
Your IGNOU journey, made easier.
  • Solved Assignments
  • Study Notes
  • Guess Papers
  • Question Papers
Skip in 10
Top
📞
Call Support Instant phone assistance IGNOU MCS 23 2023 2024 - Consider the following tables:WORKS(Pname, Cname, Salary)LIVES(Pna | IGNOU Academy
→
🟢
WhatsApp Chat Fast live messaging
→
Email Us Business enquiries & support
→