Say I have table called "Everyone_Loves_Relationships" which contains three fields: Boy_Name, Girl_Name, Relationship_Status. The list goes like this:
Boy_Name Girl_Name Relationship_Status
Tony Carol No
Simon Julia Yes
Frank Carol No
Frank Lucy No
Frank Lucy No
Tony Lucy No
Tony Samantha Yes
Frank Carol Yes
Each combination can show multiple times.
You'll notice that Frank and Carol are showing twice, once with a Yes and once with a No.
How do I design a SQL request that checks for combinations of Boy_Name&Girl_Name that have both a Yes and a No?
Thank you!
CASE WHEN Relationship_Status IN (1st synonims list) THEN 1 EWHEN Relationship_Status IN (2nd synonims list) THEN 2 ELSE 3 END < 1– Akina Dec 07 '19 at 18:55