Sample queries
This sections provides several examples to demonstrate how to extract data from this graph.
List Datasets created by a specific organization.
In a Knowledge Graph, power comes from relationships. This query finds datasets and connects them to their creators, filtering the results to only show datasets created by a specific organization (e.g., "Helmholtz").
PREFIX schema: <https://schema.org/>
SELECT ?title ?authorName ?orgName WHERE {
?dataset a schema:Dataset ;
schema:name ?title ;
schema:creator ?person .
?person schema:name ?authorName ;
schema:affiliation ?org .
?org schema:name ?orgName .
# Filter for a specific organization keyword
FILTER(CONTAINS(?orgName, "Helmholtz"))
}
List Software with MIT or legalcode license.
PREFIX schema: <https://schema.org/>
SELECT ?software ?softwareName ?license
WHERE {
?software a schema:SoftwareSourceCode ;
schema:name ?softwareName ;
schema:license ?license .
FILTER(?license in (<https://opensource.org/licenses/MIT> , <https://creativecommons.org/licenses/by/4.0/legalcode>))
}
List Top 3 organisations in the Helmholtz Association by total count of published digital assets (datasets, documents, and software combined).
PREFIX schema: <https://schema.org/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
SELECT ?orgName (COUNT(DISTINCT ?asset) AS ?assetCount)
WHERE {
?asset schema:publisher ?org .
?org schema:name ?orgName .
?asset rdf:type ?assetType .
FILTER (?assetType IN (schema:Dataset, schema:ScholarlyArticle, schema:SoftwareSourceCode))
}
GROUP BY ?orgName
ORDER BY DESC(?assetCount)
LIMIT 3
List contributions and their types that demonstrate collaboration by a person from Forschungszentrum Jülich (FZJ).
PREFIX schema: <https://schema.org/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
SELECT DISTINCT ?outputName ?assetClass ?fzjAuthorName ?fzjOrgName
WHERE {
?output rdf:type schema:Thing.
?output (schema:creator|schema:author|schema:contributor) ?fzjAuthor .
?fzjAuthor schema:affiliation ?fzjOrg .
?fzjOrg schema:name ?fzjOrgName .
FILTER (REGEX(?fzjOrgName, "Forschungszentrum Jülich|FZJ", "i"))
?fzjAuthor schema:name ?fzjAuthorName .
?output schema:name ?outputName .
OPTIONAL { ?output rdf:type ?assetClass . }
}
List Scholarly articles that directly cite a Dataset.
PREFIX schema: <https://schema.org/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
SELECT DISTINCT *
WHERE {
?article rdf:type schema:ScholarlyArticle .
?article schema:citation ?object.
?object rdf:type schema:Dataset .
}
List all seminars since 2020 organized by Helmholtz AI about neural networks.
PREFIX schema: <https://schema.org/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
SELECT DISTINCT *
WHERE {
?event rdf:type schema:Event; schema:name ?eventName .
OPTIONAL { ?event schema:startDate ?startDate . }
OPTIONAL { ?event schema:date ?dateFallback . }
FILTER (xsd:dateTime(?startDate)>="2020-01-01"^^xsd:date)
OPTIONAL { ?event schema:organizer/schema:name ?organizerName . }
OPTIONAL { ?event schema:url ?eventURL . }
OPTIONAL { ?event schema:description ?description . }
FILTER ( (REGEX(?eventName, "seminar", "i") ))
FILTER ( (REGEX(?organizerName, "Helmholtz AI", "i") ))
FILTER ( (REGEX(?description, "neural networks", "i") ))
}
