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

CONSTRUCT {
    :pat a rdfs:Resource.
    :bob :loves ?x.
    ?x :is :lonely.
} WHERE {
    :pat a rdfs:Resource.
    :bob :loves ?x.
    ?x :is :lonely.
}
