Two nested selects The inner select groups by partId, name, value The outer select groups by partId, name
-----Ursprüngliche Nachricht----- Von: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] Im Auftrag von Dominique Devienne Gesendet: Donnerstag, 11. Oktober 2018 18:00 An: General Discussion of SQLite Database <sqlite-users@mailinglists.sqlite.org> Betreff: [EXTERNAL] [sqlite] Find key,value duplicates but with differing values I can find duplicates fine: select xmd.partId, parts.title, xmd.name, count(*) "#dupplicates", group_concat(xmd.value) "values", group_concat(xmd.idx) "indexes" from extra_meta_data xmd join parts on parts.id = xmd.partId group by partId, name having "#dupplicates" > 1; but most actual duplicates have the same value, so are harmless. so I'd like to select only the xmd.name rows which have differing values. Knowing that there can be more than 2 duplicates, i.e. a slef-join is not enough I think. Any hints on how to go about this problem please? Thanks, --DD _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users ___________________________________________ Gunter Hick | Software Engineer | Scientific Games International GmbH | Klitschgasse 2-4, A-1130 Vienna | FN 157284 a, HG Wien, DVR: 0430013 | (O) +43 1 80100 - 0 May be privileged. May be confidential. Please delete if not the addressee. _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users