I want to implement a simple relational division in mysql with where exists or where not exists.I don't want to use any of the aggregrate functions and also don't want to use where in or where not in clauses.I am trying to write relational algebra and relational calculus queries for the same so it would be easy if I do it this way.
For example:
GID PID TEAM 101 1 X 201 2 X 301 3 X 101 4 Y 201 5 Y 101 6 Z
The answer is GID,TEAM/GID which gives X as the answer.I want to know how to implement this is mysql with where exists or not exists.