|
My question may seem very dumb. I am very new to SPARQL. The thing is I have a file in turtle format like below.
I have to write two SPARQL queries.
Thanks! |
|
Write this query and you will get URIs (?unknownEntityURI and ?entityTypeURI) and Text (?entityTypeTEXT) of entity whose name is "Thomson" and has property EntityType PREFIX aapi: <http://rdf.alchemyapi.com/rdf/v1/s/aapi-schema#>
SELECT ?unknownEntityURI ?entityTypeURI ?entityTypeTEXT {
# find all the entries where the attribute aapi:Name is Thomson, with this:
?unknownEntityURI aapi:Name ?Name.
?Name aapi:label „Thomson“.
# this finds type of entity:
?unknownEntityURI aapi:EntityType ?entityTypeURI.
?entityTypeURI aapi:label ?entityTypeTEXT.
}
|


What have you tried? Remember that SPARQL matches triples, and variables act as the unknown components.
eg, consider query 1s triple pattern as (any entry) (aapi:Name) ("Thomson"), and use this as a starting point to try a potential queries.
There are numerous good tutorials on SPARQL thats should help with the syntax.
Let us know how you get on (include the SPARQL query that you have tried and are having difficulty with).