On 6/26/2012 1:19 PM, Peter Haworth wrote:
I still have the issue that, in order to be selected,  the rows in the
groups containing two entries must have a different value in a specific
column.

I'm not quite sure I understand the condition, but perhaps you are looking for something like this:

SELECT * from TableA WHERE z in (
  SELECT z FROM TableA GROUP BY z
  HAVING count(*)=2 and min(otherColumn) != max(otherColumn)
);

--
Igor Tandetnik

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to