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

how to find Running Count of String Column?

$
0
0
Hi Members,

I'm a new bee in SQL and would request your support for the below requirement.

below are the columns I have in table Customers.


DateCustomerID
7/14/2015AAA
7/14/2015BBB
7/15/2015AAA
7/15/2015BBB
7/15/2015CCC
7/16/2015AAA
7/17/2015AAA
7/18/2015AAA
7/19/2015AAA

What I need is to find running sum of count of customerIDs. here CustomerID is string.

so, the expected result is


DateRun_Sum
7/14/20152
7/15/20155
7/16/20156
7/17/20157
7/18/20158
7/19/20159

It would be great if you can share the query.

Thanks,

Dhamu13


Viewing all articles
Browse latest Browse all 7129

Trending Articles



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