I'm not entirely sure how possible this is in a select statement, or if I'm better getting all results and doing checks myself in Android Studio.
I've got 3 tables, a table that stores Recordings, a Table that stores Tags and a table that links the Tags to the Recordings - TagsLink.
The TagsLink table has 2 columns, one that stores the TagsID and one that stores the RecordingsID
What I'm hoping to do is only return RecordingsIDs that meet the selected Tags criteria. So if TagsID 3 is selected, Recordings 1, 2 and 4 are returned. And if TagsID 3 and 4 are selected, it returns only Recordings 2 and 4.
In my mind it's something along the lines of:
SELECT DISTINCT RecordingsID FROM TagsLink WHERE ...
If this isn't entirely possible, any advice on other ways of achieving this (even if it requires restructuring the database) would be greatly appreciated!