I wrote this query
SELECT K.ID, K.`TYPE`, K1.`TYPE`, FROM table K INNER JOIN table K1 ON K1.ID = K.ID WHERE K1.`TYPE` = 'ISSN' AND K.`TYPE` = 'ISBN'
It looks for one object ID having two records, one with type = ISSN and one with ISBN.
These tables are very big and this query takes about ten minutes to run. Is there a faster alternative to using either nested select (on the same table) or group by having syntax