Hello,
Can any SQL master out there help me with a query? I have the following table:
contract project activity
row1 1000 8000 10
row2 1000 8000 20
row3 1000 8001 10
row4 2000 9000 49
row5 2000 9001 49
row6 3000 9000 79
row7 3000 9000 78
Basically, the query I'm looking for would return "2000,49" for "contract, activity" because only contract #2000 has one, and ONLY one, unique activity value.
I greatly appreciate your help,
Thanks a million in advance,
boroatel
Desperate for SQL query help!!
Moderator: General Moderators
- novice4eva
- Forum Contributor
- Posts: 327
- Joined: Thu Mar 29, 2007 3:48 am
- Location: Nepal
Re: Desperate for SQL query help!!
Code: Select all
SELECT creditor_type, entity_type_cd
FROM all_data_information
GROUP BY creditor_type, entity_type_cd
having count(*)=1