SPARQL Query Example 1 in web ontology

Resource description freamework(RDF):

learning sparql

SPARQL Query:

PREFIX ab: <https://www.t4tutorials.com/personal#>
SELECT ?name
WHERE
{
?person ab:firstName “barak” .
?person ab:lastName “obama” .
?p
  • ?name is a variable any name can be in this variable
  • ?person is the subject and
  • firstName is the predicate
  • lastName is the predicate
  • barak is the object
  • obama is the object

Output:

name
barak obama

 

 

 

 

Fazal Rehman Shamil
Welcome to all friends. The reason for our success is only your love for T4Tutorials. Our team is always available to answer your queries regarding any kind of confusions or discussion regarding your study and career matters. For discussion with us please join our facebook group "T4Tutorials.com". The link of the group is mentioned below. Thanks and love to all for connecting with us. We are nothing without you. Love you all.....
https://web.facebook.com/groups/2066136233601097/