@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
@prefix : <http://example.org/#>.

# query
{
    :pat a rdfs:Resource.
    :bob :loves ?x.
    ?x :is :lonely.
} => {
    :pat a rdfs:Resource.
    :bob :loves ?x.
    ?x :is :lonely.
}.
