I *think* this is a correction, but maybe it is me not fully groking the syntax, first where clause started with an AND before, rather than a WHERE
a little node template customization