@MatthewRoche Just wondering if there is any reason my answer will not work for you? I ended up creating a test music library on my test server so that I can get some artist, album and track data into that DB.
I used “Weird Al” Yankovic as my test and loaded the albums Even Worse, UHF, Off the Deep End and The Food Album specifically because there are duplicate tracks between these albums (specifically there are 5 songs that appear on 2 different albums each, so a good spread).
Anyway, I updated my SQL from my answer above to the below and based on what you provided in your last post and the fact that you are only looking at metadata_items from that, I believe it would help accomplish what you are trying to do.
SELECT
artist.title as "Artist",
album.title as "Album",
track.title as "Track Title",
artist.title || ' - ' || album.title || ' - ' || track.title as "Combined Title",
track.guid as "Episode GUID",
album.guid as "Album GUID",
artist.guid as "Artist GUID"
FROM
metadata_items track
INNER JOIN
metadata_items album ON album.id = track.parent_id
INNER JOIN
metadata_items artist ON artist.id = album.parent_id
WHERE
artist.title = '“Weird Al” Yankovic';
Note that WHERE clause in this case is specifically to narrow my results and all the fields in the select aside from the “Combined Title” field were just for confirmation and also showing the individual field.
Screenshot of the results from above query:
Screenshot of the results of above query filtering on specific tracks:
I realize the GUID fields do not actually shown anything in the screenshots with the way DB Browser for SQLite shows the results, but you run the query on your DB and check those out.
Additionally, I do not know if you are looking at the metadata_item_views table at all, but I just took a look and noticed that for music, in that table you have the artist, album and track information, so you should be able to use that from there to determine which version was played.
I am not sure if I am missing/not understanding something, but it seems to me that with the above query, you should be able to differentiate the version you are listening too.
-Shark2k