Quantcast
Channel: Forum Getting started with SQL Server
Viewing all articles
Browse latest Browse all 8979

Sorting Dates group by for each customer

$
0
0

I have a data set for products bought by each customer, i want to give an order to their transactions by sorting the date columns.  

for Example :

---------------------------------------------------------------------------------

SubID           Date                        other columns          OrderColumn  

1                  2010/08/12                ......                               ?

1                  2011/09/12                .......                              ?

1                  2013/09/12                ......                               ?

2                  2013/09/12                .......                              ?

2                  2011/04/03                ......                               ?

---------------------------------------------------------------------------------

I want to give an order to the transactions for each customer.   

something like this :

---------------------------------------------------------------------------------

SubID           Date                        other columns          OrderColumn  

1                  2010/08/12                ......                              1

1                  2011/09/12                .......                             2

1                  2013/09/12                ......                              3

2                  2013/09/12                .......                             2

2                  2011/04/03                ......                              1

---------------------------------------------------------------------------------

 Thanks for your help


Viewing all articles
Browse latest Browse all 8979

Trending Articles



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