询问:
select distinct R1.name, R2.name
from (
(
select Ra.mID mID, Re.rID rID, Re.name name
from Rating Ra join Reviewer Re using (rID)
) R1
,
(
select Ra.mID mID, Re.rID rID, Re.name name
from Rating Ra join Reviewer Re using (rID)
) R2
where R1.mID = R2.mID and R1.rID > R2.rID;
结果:
Query failed to execute: near "where": syntax error
我猜这个问题与 WHERE 子句中引用的 FROM 子句中的指针变量有关,但我无法弄清楚。我最近对我的 WHERE 不是很警惕...