If all of the dogs are lying down, either on their bellies or on their backs, but not on their side.
return dogs ;return side of #1 ;return bellies of #1 ;return backs of #1 ;return #1 that are lying down on   #3 ;return #1 that are lying down on   #4 ;return #1 that are lying down on   #2 ;return number of  #7 ;return if  #8 is equal to  zero ;return #5 , #6 ;return number of  #10 ;return number of  #1 ;return if  #12 is equal to  #11 ;return if  both  #13 and #9 are true
['select', 'project', 'project', 'project', 'filter', 'filter', 'filter', 'aggregate', 'boolean', 'union', 'aggregate', 'aggregate', 'boolean', 'boolean']