The table Arc(x,y)
currently has the
following tuples (note there are
duplicates):
(1,2),
(1,2),
(2,3),
(3,4),
(3,4),
(4,1),
(4,1),
(4,1),
(4,2)
Compute the result of the query:
SELECT a1.x, a2.y, COUNT(*)
FROM Arc a1, Arc a2
WHERE a1.y = a2.x
GROUP BY a1.x, a2.y;
What are a1
and a2
referring to?