请问有人能解释一下以下SQL中的内连接语法吗:
CREATE TABLE dataset AS
SELECT property.id
, amount.band
, amount."value"
FROM property
INNER JOIN (locality INNER JOIN amount ON locality.code = amount.code) ON (property.band = amount.band) AND (property.id = locality."UniqueId")
为什么在第二个内部连接之前定义了表locality
?我从未遇到过这样奇怪的语法。
是否有更清晰的方法来编写相同的查询,以便某人可以轻松理解发生了什么?
... INNER JOIN (SELECT * FROM locality INNER JOIN ...
- jarlh