My Data is like this
Id Date Value
123 3/13/2016 2:39:30 AM 1
123 3/13/2016 2:39:30 AM 2
123 3/13/2016 2:39:30 AM 1
123 3/13/2016 2:39:30 AM 3
123 3/13/2016 2:39:30 AM 3
124 3/13/2016 2:39:30 AM 1
124 3/13/2016 2:39:30 AM 1
I want my answer having counts of
IDs Value Count
123 1 2
123 2 1
123 3 2
124 1 2
after this result I want to add these count by id i.e.,TotalTime = 123 – 3 (2+1 – count of values)