Hello,
I am getting a total cost more than 100% when totaling individual query costs.
declare@datesmalldatetimeSELECTReffdasName,(select((selectcount(*)from[cal_reg].[dbo].[customer]whereupper(Reffd)=upper(main.reffd)andcast(dateassmalldatetime)=@date)+(selectcount(*)from[cal_reg].[dbo].[rep]whereupper(Reffd)=upper(main.Reffd)andcast(dateassmalldatetime)=@date)))asCompleted,(select((selectcount(*)from[cal_reg].[dbo].[customer]whereupper([callAttnd])=upper(main.[Reffd])andcast(dateassmalldatetime)=@date)+(selectcount(*)from[cal_reg].[dbo].[rep]whereupper([CallAttnd])=upper(main.reffd)andcast(dateassmalldatetime)=@date)))asAttended,(SELECT((select((selectcount(*)from[cal_reg].[dbo].[customer]whereupper(Reffd)=upper(...