Finding the links where you can download an Album or a Track for free

1       PREFIX mo: &lt;http://purl.org/ontology/mo/&gt; 2       SELECT ?download_link_album ?download_link_track 3       WHERE 4       { 5            { 6                &lt;http://mm.musicbrainz.org/record/a89e1d92-5381-4dab-ba51-733137d0e431&gt; a mo:Record; 7                                                                                      mo:freedownload ?download_link_album. 8           } 9            UNION 10          { 11               &lt;http://mm.musicbrainz.org/record/a89e1d92-5381-4dab-ba51-733137d0e431&gt; mo:has_track ?track. 12              ?track a mo:Track; 13                     mo:freedownload ?download_link_track. 14          } 15       }