If one of the images shows exactly one dog with one sheep.
return dogs ;return sheep ;return images ;return number of #1 for each #3 ;return #3 where #4 is  equal to one   ;return number of #2 for each #5 ;return #5 where #6 is  equal to one   ;return number of #7 ;return If #8 is  equal to one
['select', 'select', 'select', 'group', 'comparative', 'group', 'comparative', 'aggregate', 'boolean']