Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试计算每个 C.ID 的 B.ID。
到目前为止,我得到以下信息:
Select C.ID, COUNT(Distinct B.ID)AS 'Total bookings' FROM Client C inner join Booking B on B.ClientID=C.ID Where ClientID = '594861' Group by C.ID
问题出在我的 Group by 身上!