4 Replies Latest reply on Feb 6, 2019 9:52 AM by Christian Pautsch

    Building a Query that (effectively) does a traversal based on unique values

    Christian Pautsch

      Situation:  I am tracking certain details present on various hosts. I have a pattern that creates Detail nodes with various custom attributes based off of information I gather. One of these attributes is a Serial Number. This serial number is not necessarily unique among all nodes of this type, so that there are some serial numbers which are shared among many different details. This is fine, because I use a combination of other values for my node key. Some serials are only used by one detail, while other serials may be shared by a dozen different details, all on different hosts potentially.


      Goal:  I want to see a list of every unique serial number (so that each serial number appears only once, no duplicates), as well as every host which contains a Detail with that serial number.


      Example: I have the following information:

      Serial 123 on Host A

      Serial 123 on Host B

      Serial 123 on Host C

      Serial 456 on Host D


      I would like to have a query that then reports this information in the following way:


      Serial #Host
      Serial 123Host A, Host B, Host C
      Serial 456Host D


      Problem: I can easily create a query that will show me every unique serial # in my custom Details. I can easily create a query that shows me every host which has one of these custom details. But I cannot get a list of the unique serial numbers, and every host on which they reside.


      If I had a separate detail which represented unique serials, this would be easy, but that is more complexity than we currently want.


      Is this solvable?