Hammelkeule Hammelkeule - 5 months ago 26
SQL Question

count + merge same values in different columns

I have a select which give me following output:

enter image description here

Now I want to merge the entrys where for a name like 'Jacobson' the number and year is the same and Count these same entrys.


What you want to do is a so called group by operation.

Select Number, Name, Year, Count(*)
From table
Group By Number, Name, Year

Entries with the same Number, Name and Year are grouped and counted.