I just got this installed as I read on different threads that this can find duplicates.
Yes, it is possible.
There is a post from 2007 seems to be an old syntax for finding duplicates. https://hydrogenaud.io/index.php?topic=51307.msg505964#msg505964
It's because it's a different component.
Getting %artist% and %title% duplicates would be what I'm after.
Put this into the batch section of the query:
DROP TABLE IF EXISTS tmp_artist_title;
CREATE TABLE tmp_artist_title AS
SELECT strfilter(lower(unaccent(artist)),'abcdefghijklmnopqrstuvwxyz0123456789') AS "artist",
strfilter(lower(unaccent(title)),'abcdefghijklmnopqrstuvwxyz0123456789') AS "title"
FROM MediaLibrary
WHERE title IS NOT NULL
AND strfilter(lower(unaccent(title)),'abcdefghijklmnopqrstuvwxyz0123456789')<>''
GROUP BY 1,2;
CREATE UNIQUE INDEX tmp_artist_title_pk ON tmp_artist_title(title,artist);
DROP TABLE IF EXISTS tmp_artist_title_path;
CREATE TABLE tmp_artist_title_path AS
SELECT path,
subsong,
strfilter(lower(unaccent(artist)),'abcdefghijklmnopqrstuvwxyz0123456789') AS "artist",
strfilter(lower(unaccent(title)),'abcdefghijklmnopqrstuvwxyz0123456789') AS "title"
FROM MediaLibrary a
WHERE title IS NOT NULL
AND strfilter(lower(unaccent(title)),'abcdefghijklmnopqrstuvwxyz0123456789')<>''
AND EXISTS (SELECT NULL
FROM tmp_artist_title
WHERE artist=strfilter(lower(unaccent(a.artist)),'abcdefghijklmnopqrstuvwxyz0123456789')
AND title=strfilter(lower(unaccent(a.title)),'abcdefghijklmnopqrstuvwxyz0123456789'))
ORDER BY 3,4;
DROP TABLE IF EXISTS tmp_paths;
CREATE TABLE tmp_paths AS
WITH Paths AS (
SELECT a.path path1,
a.subsong subsong1,
b.path path2,
b.subsong subsong2
FROM tmp_artist_title_path a JOIN tmp_artist_title_path b ON a.rowid=b.rowid+1
WHERE a.artist=b.artist
AND a.title=b.title)
SELECT path1 path,
subsong1 subsong
FROM Paths
UNION
SELECT path2, subsong2
FROM Paths;
CREATE UNIQUE INDEX tmp_paths_pk ON tmp_paths(path,subsong);
Then use this query:
SELECT upper(substr(strfilter(lower(unaccent(artist)),'abcdefghijklmnopqrstuvwxyz0123456789'),1,1)) Letter,
proper(artist) Artist
FROM MediaLibrary a
WHERE EXISTS (SELECT NULL
FROM tmp_paths
WHERE path=a.path
AND subsong=a.subsong)
ORDER BY upper(substr(strfilter(lower(unaccent(artist)),'abcdefghijklmnopqrstuvwxyz0123456789'),1,1)),
strfilter(lower(unaccent(artist)),'abcdefghijklmnopqrstuvwxyz0123456789') COLLATE NaturalNoCase,
CAST(length_seconds AS INTEGER),
title
Note: this might also find tracks, which are actually no duplicates, because all non-alphanumeric characters and diacritics are removed from artist and title before they are compared case insensitive.
Remove all strfilter functions, if you don't want to filter out non-alphanumeric characters, e.g. lower(unaccent(artist)) for the artist.
Remove all unaccent functions, if you don't want diacritics to be removed, e.g. strfilter(lower(artist),'abcdefghijklmnopqrstuvwxyz0123456789') for the artist.
Remove all lower functions, if you want a case sensitive comparison, e.g. strfilter(unaccent(artist),'abcdefghijklmnopqrstuvwxyz0123456789') for the artist.
If you don't want all of them above just use the relevant column, e.g. just artist for the artist.