http://qs321.pair.com?node_id=664286


in reply to Re^2: (OT) Exclusion selection on DBI
in thread (OT) Exclusion selection on DBI

The additional requirement of the supermarket id just adds a WHERE clause WHERE supermarket in (1, 2).

And of course the supermarket ID has to appear in your SELECT list.