AnsweredAssumed Answered

Count the number of entries per another entry

Question asked by on Mar 1, 2018
Latest reply on Apr 9, 2018 by jfranklin



I have a table with a column for ServerID, another for ApplicationID and a third for DatabaseName. I want to find out which of these servers are used as a database hotel


ServerID   ApplicationID   DatabaseName

ABC123   aabb                 A1

ABC123   aabb                 A2

ABC123   ccdd                 A3

ABC123   eeff                   A4

ABC456   gghh                 A5

ABC456   gghh                 A6


My idea was to count the numbers of AppllicationID's per ServerID. If I get a number higher than 1, I know it's a database hotel. In the example above I would like to get the result:


ServerID   ApplicationID   DatabaseName   Number of ApplicationIDs per ServerID

ABC123   aabb                 A1                         3

ABC123   aabb                 A2                         3

ABC123   ccdd                 A3                         3 

ABC123   eeff                   A4                         3

ABC456   gghh                 A5                         1

ABC456   gghh                 A6                         1


I've been browsing through the formulas and I cannot find what I'm looking for.

Any good ideas anyone?


Thanks in advance.

Lars Peterson