13.12. Same Relation A and B, M - M match over cols Aid(D),Bid(D)¶
Now let’s look at matching over one of the columns in the creature relation that is not its identifier: reside_townId.
Here is the Creature information again:
Find each ordered pair of creatures that reside in the same town.
In the example below, we must use the syntax that similar to the times from the set operator chapter, as given in the first tab. We add the WHERE clause to get the filter. We project by eliminating reside_townId from C2.
Note how this is an ordered creature pair.
13.12.1. Other Queries to try:¶
Try creating the precedence charts for these queries.
Find each ordered pair of skills that originate in the same town.
Find each ordered pair of achievements that were tested in the same town.