[Solved] Complex query on sql lite xcode


Try this:

SELECT a.artistname,
    (SELECT COUNT(*) FROM track t
    WHERE t.trackartist = a.artistid)
FROM artist a

solved Complex query on sql lite xcode