I believe that you can think of this as an operator precedence issue.
When you write this:
FROM groups grp,
insrel archiverel
LEFT OUTER JOIN ownrel ownrel ON grp.number = ownrel.dnumber
LEFT OUTER JOIN tags tags ON tags.number = ownrel.snumber
I think it is interpreted by the parser like this:
FROM groups grp,
(
(
insrel archiverel
LEFT OUTER JOIN ownrel ownrel ON grp.number = ownrel.dnumber
)
LEFT OUTER JOIN tags tags ON tags.number = ownrel.snumber
)
If so, then in the innermost join "grp" is unbound.
When you reverse the lines with "groups" and "insrel", the innermost join applies to "groups" and "ownrel", so it works.
Probably this would work as well:
FROM groups grp
JOIN insrel archiverel ON archiverel.dnumber = grp.number
LEFT OUTER JOIN ownrel ownrel ON grp.number = ownrel.dnumber
LEFT OUTER JOIN tags tags ON tags.number = ownrel.snumber
WHERE archiverel.snumber = 11128188
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…