Quantcast
Viewing all articles
Browse latest Browse all 6

Need help on TSql logic

Hi MS SQLSERVER,

I can see s.accountid in your query, but there is no table named s. Could you please help check the query?

From your description, do you need to sum up all the cost? If yes, you can use sum function and group by logic.

select distinct appc.provider,li.phonenumber,sum(li.totalcost) as TotalCost
 from lineitem li
 ...
group by appc.provider,li.phonenumber


Viewing all articles
Browse latest Browse all 6

Trending Articles