嘿伙计们,我正在尝试总结这些表格,但我不知道我做错了什么
我的第一张桌子是:
Reserve
ReserveID MembershipID PlayerCount Time CourseID
我的第二张桌子是
Courses
CourseID Name
我正在尝试的 sql 语句在这里:
Select Sum(Reserve.Player_Count)Total
From Reserve
Left Join Courses
On Courses.CourseID = Reserve.ReserveID
Where Time = "2012-04-09 07:10:00"
And Courses.Name = "Lake" (or I had Courses.CourseId = "1")