I have a table and it looks like
I need to create a table that consists of the following columns
Table includes unique ID, min date when the number of sms was max and max date when the number of sms was min, including the numbers of sms for both cases
I've tried several queries, but I feel that the problem is not in finding min(sms) in a column "sms" in general but with a condition max(date) for the column "date"
So if I have to find maximum amount of sms sent on minimum data, I should pick the minimum data when the number was maximum. Now I can only find the number of sms sent on min data.
Will be glad for any explanation
P.S.: I'm using MS SQL 2014