If one dog has a collar or leash.
return dog ;return collar ;return leash ;return #1 that has #2 ;return #1 that has #3 ;return number of  #4 ;return number of  #5 ;return if  #6 is equal to  one ;return if  #7 is equal to  one ;return if  #8 or #9 is true
['select', 'select', 'select', 'filter', 'filter', 'aggregate', 'aggregate', 'boolean', 'boolean', 'boolean']