语法错误(缺少运算符),查询嵌套了JOIN和GROUP BY

时间:2013-05-20 16:37:22

标签: sql ms-access

我正在尝试构建一个使用JOIN和GROUP BY的查询,如下所示:

select r.id,r.[full name],r.[start date],min(work_date) 
from 
(resource r
left join
resourceVendorHistory rvh
on
r.id=rvh.resourceid)
left join
resource_activities ra
on
r.id=ra.resourceid
group by r.id,r.[full name],r.[start date]
where
rvh.resourceid is null
and
ra.id is not null
order by
ra.work_date asc

我收到了一个错误:

Syntax error (missing operator) in query expression 'r.[start date] where rvh.resourceid is null and ra.id is not null'.

我需要做些什么特别的事情才能将第二个JOIN与GROUP BY分开?

0 个答案:

没有答案