Code: Select all
<Group|Name:Artists...|Show tracks:No>\Artists with mixed first and last name order (takes some time!!)|Icon:Top level|Filter:Songs.Artist IN (SELECT a1.Artist FROM (SELECT Artist, SUBSTR(Artist, 1, INSTR( REPLACE( Artist, ",", "") , " ")-1 ) AS FirstPart, SUBSTR(Artist, INSTR(Artist, " ")+1 ) AS SecondPart FROM Artists WHERE INSTR(Artist, " ")>1) AS a1 INNER JOIN (SELECT Artist, SUBSTR(Artist, 1, INSTR( REPLACE( Artist, ",", "" ), " ")-1 ) AS FirstPart, SUBSTR(Artist, INSTR(Artist, " ")+1 ) AS SecondPart FROM Artists WHERE INSTR(Artist, " ")>1) AS a2 ON a1.FirstPart = a2.SecondPart AND a2.FirstPart = a1.SecondPart AND a1.FirstPart <> a1.SecondPart)
For performance reasons there is no TRIM or UPPERW, so there should be no superfluous spaces or mixed upper/lower case in your artists names.
BTW, the artist can be e.g. author as well, so you may have to show and check those columns as well in the result.
Before opening the node, it may be necessary to run the library maintainance to get rid of unused artists.