here'sHere's some sample data. I did not put any data in for the "blahs" since it is not relevant for the query (iI believe)
Date, ID, blah, blahblah, blahblahblah:
9/8/2016, 1
9/8/2016, 2
9/8/2016, 3
9/8/2016, 4
9/8/2016, 5
9/8/2016, 6
9/8/2016, 7
9/8/2016, 8
9/9/2016, 1
9/9/2016, 2
9/9/2016, 3
9/9/2016, 4
9/9/2016, 5
9/9/2016, 9
9/9/2016, 10
9/9/2016, 11
9/10/2016, 2
9/10/2016, 4
9/10/2016, 6
9/10/2016, 11
9/10/2016, 12
9/10/2016, 13
Date, ID, blah, blahblah, blahblahblah
9/8/2016, 1
9/8/2016, 2
9/8/2016, 3
9/8/2016, 4
9/8/2016, 5
9/8/2016, 6
9/8/2016, 7
9/8/2016, 8
9/9/2016, 1
9/9/2016, 2
9/9/2016, 3
9/9/2016, 4
9/9/2016, 5
9/9/2016, 9
9/9/2016, 10
9/9/2016, 11
9/10/2016, 2
9/10/2016, 4
9/10/2016, 6
9/10/2016, 11
9/10/2016, 12
9/10/2016, 13
Date, Total IDs Last Day
9/8/16,3
9/9/16,8
Date, Total IDs Last Day
9/8/16,3
9/9/16,8
The expected output run on 9/10/16 would be:
Date, Total IDs Last Day
9/8/16,2
9/9/16,4
9/10/16,6
Date, Total IDs Last Day
9/8/16,2
9/9/16,4
9/10/16,6