avatar
Untitled

Guest 1.4K 20th Dec, 2021

24. tất cả các đối tượng là người
select ?thing where {
  ?thing rdf:type dbo:Person .
}


25. tìm tất cả các đối tượng vừa là người vừa có giới tính là “female”:
select ?thing where {
  ?thing a dbo:Person .
  ?thing tto:sex "female" .
}


26. tìm tất cả các đối tượng có giới tính:
select ?thing ?sex where {
  ?thing tto:sex ?sex .
}


27. tìm tất cả đối tượng không có vật nuôi
select ?person ?pet where {
    ?person rdf:type dbo:Person .
	?person tto:pet ?pet .
}


28. tìm tất cả đối tượng không có vật nuôi.
select ?person ?pet where {
    ?person rdf:type dbo:Person .
	filter not exists {?person tto:pet ?pet }.
}


29. tìm tất cả các lớp con của lớp Creature
select ?subSpecies   where {
  ?subSpecies rdfs:subClassOf tto:Creature .
}


30. tìm tất cả thú cưng của William và John:
select ?pet where {
	{
		ttr:William tto:pet ?pet .
	} UNION {
		ttr:John tto:pet ?pet .
	}
}
Markdown
Description

No description

To share this paste please copy this url and send to your friends
RAW Paste Data