Question: ( 2 Marks ) The UNIQUE operator evaluates to true if there are no duplicate tuples in the result of some subquery. This operator does
Marks The UNIQUE operator evaluates to true if there are no duplicate tuples in the result of
some subquery. This operator does not exist in Postgres. The following query returns each
employee who has exactly one dependent. Rewrite this query so it will run in Postgres. Use a
subquery.
SELECT
FROM employee c
WHERE UNIQUE
SELECT essn
FROM dependent d
INNER JOIN employee o
ON ossn dessn
WHERE ossncssn;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
