If each image shows one dog wearing a collar, and no image shows a dog in an action pose.
return dog  ;return collar ;return #1 that is wearing #2 ;return images ;return number of  #3 for each  #4 ;return #4 where  #5 is equal to  one ;return number of  #4 ;return number of  #6 ;return if  #7 is equal to  #8 ;return #1 that is in  action pose ;return number of  #10 ;return if  #11 is equal to  zero ;return if  both  #9 and #12 are true
['select', 'select', 'filter', 'select', 'group', 'comparative', 'aggregate', 'aggregate', 'boolean', 'filter', 'aggregate', 'boolean', 'boolean']