【发布时间】:2018-02-06 11:27:55
【问题描述】:
我有如下数据:
SerivceID Service_Name Serivce_Charges FK_VendorID FK_ExpertID FK_CustomerID BookingDate TimeSlot current_Job GettingJobDate
4 Furniture & Home Decor 200 1 2 1 08-11-2017 3 1 2018-02-04 13:57:49.733
连续。现在我想知道哪个查询是:
select A_Services.Service_Name as [Service Name],count(Service_Name) as [Total Serve]
from A_Services where FK_ExpertID = 2 group by Service_Name order by [Service Name]
它显示数据:
Service Name Total Serve
Furniture & Home Decor 1
我想获取数据:
Service Name Total Serve
Furniture & Home Decor 1
Car Towing 0
【问题讨论】:
-
修正格式。当我尝试编辑问题时,我无法这样做。
-
所以,如果汽车拖车不在您的餐桌上,您还想展示它吗?那么包含所有名称的基表是什么?
标签: sql sql-server sql-server-2008