Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

Select query to transform table

$
0
0

Hello, I don't know who to go about selecting rows from a purchase table and transform the result as shown on the attached picture. I don't even know if this is possible. My boss wants me to get a purchase list showing purchased quantities by date.  The first table is self explanatory and the second is how I should format the result.  My biggest problem is that the purchase date column is variable for Customer and Product IDs.  Can someone please help me to get this list, I would like something that will work always without having to rewrite the query all the time.  Thank you in advance.


Viewing all articles
Browse latest Browse all 23857

Latest Images

Trending Articles



Latest Images

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