I need to write a function.
It takes any value from the dataset as input and should look for an intersection in all rows.
For example:phone = 87778885566
The table is represented by the following fields:
- key
- id
- phone
Test data:
- 1; 12345; 89997776655; test@gmail.com
- 2; 54321; 87778885566; two@gmail.com
- 3; 98765; 87776664577; three@gmail.com
- 4; 66678; 87778885566; four@gmail.com
- 5; 34567; 84547895566; four@gmail.com
- 6; 34567; 89087545678; five@gmail.com
The output should be:
- 2; 54321; 87778885566; two@gmail.com
- 4; 66678; 87778885566;four@gmail.com
- 5; 34567; 84547895566; four@gmail.com
- 6; 34567; 89087545678; five@gmail.com
It should check all values and if values intersect somewhere, return a dataset with intersections.