If each image shows one standing basset hound, and one image includes a person with hands at the front and back of the dog.
return basset hounds ;return #1 that are  standing ;return images ;return number of #2 for each #3 ;return #3 where #4 is  equal to one  ;return number of #3 ;return number of #5 ;return If #6 is  equal to #7 ;return person ;return dog ;return front of  #10 ;return back of  #10 ;return #11 ,   #12 ;return #9 that is  with  hands at #13 ;return If #14 is  in  at least one  image ;return If both  #8 and #15 are  true
['select', 'filter', 'select', 'group', 'comparative', 'aggregate', 'aggregate', 'boolean', 'select', 'select', 'project', 'project', 'union', 'filter', 'boolean', 'boolean']