PREFIX dgp353: prefix foaf: PREFIX dgtwc: SELECT ?state_name ?state_population ?number_of_books as ?total_books WHERE { GRAPH { ?entry dgp353:phys_st ?state_code. ?entry dgp353:bkservol ?number_of_books. ?entry dgp353:popu_st ?state_population } GRAPH { ?s3 foaf:name ?state_name . ?s3 dgtwc:abbreviation ?state_code } }