Hammelkeule Hammelkeule - 1 year ago 85
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.

Answer Source

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.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download