Quantcast
Channel: Microsoft SQL Server
Viewing all articles
Browse latest Browse all 4871

I can't get my query to do what I need

$
0
0

Hello everyone, thank you in advance for taking a look at this.

I have my query written and it's working GREAT (I used SSMS to build it).

The last step I need to take is to group by column "A" but sum together the totals of column "Y". I'll give you an example... please refer to the Screen Shot.


As you can see, in the DESCRIPTION Column we have a few items that are the same with the same number of quantity on hand. But if you look at the SALES and COST columns, they are different numbers. I need to group by the DESCRIPTION but give me only one resulting output for the SALES and COST...a sum of the different lines.

Basically, I need one description on each line with all the different amounts in SALES and COST added together.

Here is my query to get where I'm at now. Please keep in mind that the output is in the EXACT format that our 3rd...


Viewing all articles
Browse latest Browse all 4871

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>