> "The table where tbl.id=2 has 0 for both columns so it does not show up"
i'm having trouble believing this
your query
must return a row for the 2 group, regardless of whether the 2 row(s) have 0 in the x and/or y columns, or nulls, or anything else
if at least one row for 2 exists, there
will be a 2 group in the results,
unless it's eliminated by a HAVING clause
rudy
http://r937.com/