If there is a dog herding sheep and one woman in each image
return dogs ;return #1 that are  herding sheep ;return woman ;return images ;return number of #2 for each #4 ;return #4 where #5 is  at least one ;return number of #4 ;return number of #6 ;return If #7 is  equal to #8 ;return number of #3 for each #4 ;return #4 where #10 is  equal to one ;return number of #11 ;return If #7 is  equal to #12 ;return If both  #9 and #13 are  true
['select', 'filter', 'select', 'select', 'group', 'comparative', 'aggregate', 'aggregate', 'boolean', 'group', 'comparative', 'aggregate', 'boolean', 'boolean']