How can select first value of a column order by another column when I'm in a group by ?
My Data:
ID UserId HashText Text Date
-------------------------------------------------------
1 1000 123 Hi 2018-10-10
2 2000 124 Hello 2018-10-11
3 3000 123 Hi 2018-10-12
4 4000 123 Hi 2018-10-13
My Result:
UserId HashText count
-------------------------------------------------------
1000 123 3
2000 124 1
One Note: I cant use min(UserId)
- it's not always sort
by UserId