I have the following query:
我有以下查询:
select
DrugName,
DrugCategoryName,
count(*) as Count,,
'Percentage of Total' as Percentage
from
Visit V
Inner Join Drug D on
V.DrugID = D.DrugID
Inner Join DrugCategory DC on
D.DrugCategoryID = DC.DrugCategoryID
where
V.StartDate >='01 Feb 2017' and V.EndDate < '01 Mar 2017'
group by
DrugName, DrugCategoryName
select