Select multiple columns from table but Group By one column

Learner 226 Reputation points
2021-05-24T19:21:32.977+00:00

Hi Have a table where I m having data like below

99217-image.png

Now I want to group my data based on only country like below

99204-image.png

I has to sum the data based on country only and show remaining columns.

SQL Server | Other
{count} votes

Accepted answer
  1. Viorel 122.6K Reputation points
    2021-05-24T20:47:48.243+00:00

    Try something like this:

    select [Date], [Day], sum([Calls]) as Calls
    from MyTable
    group by [Date], [Day]
    order by [Date]
    
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.