Any tips on how can I get all rows given the following example?
Instruments (contains instruments I own)
Songs (a library of all my songs)
Paradise City (id 1)
Back In Black (id 2)
Instruments_In_Song (rows for each instrument in each song from above
Guitar (song_id 1)
Keyboard (song_id 1)
Guitar (song_id 2)
Drums (song_id 2)
Forget about the accuracy of the actual example. What I want is to find
all songs that have instruments that I own. In the example above, the
query would include Paradise City since I have a guitar and a keyboard,
but would omit Back in Black since I have a guitar, but don’t have a
Any pointers with ActiveRecord or general SQL would be helpful.