I would like to make a select statement, where it will return the first record by the highest ID and also a count of how many total there are of that same "order number" Is this possible with SQL?
For example, for the dataset below, I would like the record to return only 1 instance of the "order number" and a count of how many different ones (same order number, other records) there are.
Can someone help with this? Thank you.
I would like the return to show this, from the dataset below it.
ID | Order Number | Count | Date | SomethingElse
3 1234567 3 7/28/15 hello again
5 7896548 2 7/30/15 cool
ID | Order Number | Date | SomethingElse
1 1234567 7/25/15 blah
2 1234567 7/26/15 hello
3 1234567 7/28/15 hello again
4 7896548 7/28/15 test
5 7896548 7/30/15 cool