LittleBoeddha
New Member
- Joined
- Jul 30, 2017
- Messages
- 2
I have the table1 below and want to make a table that shows how many friends Ent1 has in common with any other person from Ent1. Eg A (short for AAA) has friends B,C,D,E,F while B has friends A,C,E,F. They have C,E,F in common so the outcome should be AAA BBB 3
Can this be done in acces/SQL? I have no clue ...
Table1 Ent1 Ent2 link
AAA BBB friend
AAA CCC friend
AAA DDD friend
AAA EEE friend
AAA FFF friend
BBB AAA friend
BBB CCC friend
BBB EEE friend
BBB FFF friend
CCC AAA friend
CCC BBB friend
CCC EEE friend
CCC FFF friend
DDD AAA friend
DDD KKK friend
DDD LLL friend
EEE AAA friend
EEE BBB friend
EEE CCC friend
FFF AAA friend
FFF BBB friend
FFF CCC friend
KKK DDD friend
LLL DDD friend
The outcome should be :
AAA BBB 3
AAA CCC 3
AAA DDD 0
AAA EEE 2
AAA FFF 2
AAA KKK 1
AAA LLL 1
BBB CCC 3 etc...
Can this be done in acces/SQL? I have no clue ...
Table1 Ent1 Ent2 link
AAA BBB friend
AAA CCC friend
AAA DDD friend
AAA EEE friend
AAA FFF friend
BBB AAA friend
BBB CCC friend
BBB EEE friend
BBB FFF friend
CCC AAA friend
CCC BBB friend
CCC EEE friend
CCC FFF friend
DDD AAA friend
DDD KKK friend
DDD LLL friend
EEE AAA friend
EEE BBB friend
EEE CCC friend
FFF AAA friend
FFF BBB friend
FFF CCC friend
KKK DDD friend
LLL DDD friend
The outcome should be :
AAA BBB 3
AAA CCC 3
AAA DDD 0
AAA EEE 2
AAA FFF 2
AAA KKK 1
AAA LLL 1
BBB CCC 3 etc...