Skip to content

Instantly share code, notes, and snippets.

@lucaswerkmeister lucaswerkmeister/query.sparql Secret
Created Aug 4, 2017

Embed
What would you like to do?
PREFIX gas: <http://www.bigdata.com/rdf/gas#>
SELECT ?author ?authorLabel ?work ?workLabel
WITH {
SELECT ?work ?author WHERE {
{ }
UNION {
SELECT ?work ?author WHERE {
SERVICE gas:service {
gas:program gas:gasClass "com.bigdata.rdf.graph.analytics.BFS" ;
gas:in wd:Q20980928 ;
gas:target wd:Q24290415 ;
gas:traversalDirection "Undirected" ;
gas:out ?work ;
gas:linkType wdt:P50 ;
}
?work wdt:P50 ?author
}
} # UNION END
UNION {
SELECT ?work ?author WHERE {
SERVICE gas:service {
gas:program gas:gasClass "com.bigdata.rdf.graph.analytics.BFS" ;
gas:in wd:Q20980928 ;
gas:target wd:Q26720269 ;
gas:traversalDirection "Undirected" ;
gas:out ?work ;
gas:linkType wdt:P50 ;
}
?work wdt:P50 ?author
}
} # UNION END
UNION {
SELECT ?work ?author WHERE {
SERVICE gas:service {
gas:program gas:gasClass "com.bigdata.rdf.graph.analytics.BFS" ;
gas:in wd:Q24290415 ;
gas:target wd:Q24390693 ;
gas:traversalDirection "Undirected" ;
gas:out ?work ;
gas:linkType wdt:P50 ;
}
?work wdt:P50 ?author
}
} # UNION END
UNION {
SELECT ?work ?author WHERE {
SERVICE gas:service {
gas:program gas:gasClass "com.bigdata.rdf.graph.analytics.BFS" ;
gas:in wd:Q24290415 ;
gas:target wd:Q26720269 ;
gas:traversalDirection "Undirected" ;
gas:out ?work ;
gas:linkType wdt:P50 ;
}
?work wdt:P50 ?author
}
} # UNION END
UNION {
SELECT ?work ?author WHERE {
SERVICE gas:service {
gas:program gas:gasClass "com.bigdata.rdf.graph.analytics.BFS" ;
gas:in wd:Q24390693 ;
gas:target wd:Q26720269 ;
gas:traversalDirection "Undirected" ;
gas:out ?work ;
gas:linkType wdt:P50 ;
}
?work wdt:P50 ?author
}
} # UNION END
UNION {
SELECT ?work ?author WHERE {
SERVICE gas:service {
gas:program gas:gasClass "com.bigdata.rdf.graph.analytics.BFS" ;
gas:in wd:Q13520818 ;
gas:target wd:Q20980928 ;
gas:traversalDirection "Undirected" ;
gas:out ?work ;
gas:linkType wdt:P50 ;
}
?work wdt:P50 ?author
}
} # UNION END
UNION {
SELECT ?work ?author WHERE {
SERVICE gas:service {
gas:program gas:gasClass "com.bigdata.rdf.graph.analytics.BFS" ;
gas:in wd:Q13520818 ;
gas:target wd:Q24290415 ;
gas:traversalDirection "Undirected" ;
gas:out ?work ;
gas:linkType wdt:P50 ;
}
?work wdt:P50 ?author
}
} # UNION END
UNION {
SELECT ?work ?author WHERE {
SERVICE gas:service {
gas:program gas:gasClass "com.bigdata.rdf.graph.analytics.BFS" ;
gas:in wd:Q13520818 ;
gas:target wd:Q24390693 ;
gas:traversalDirection "Undirected" ;
gas:out ?work ;
gas:linkType wdt:P50 ;
}
?work wdt:P50 ?author
}
} # UNION END
UNION {
SELECT ?work ?author WHERE {
SERVICE gas:service {
gas:program gas:gasClass "com.bigdata.rdf.graph.analytics.BFS" ;
gas:in wd:Q13520818 ;
gas:target wd:Q26720269 ;
gas:traversalDirection "Undirected" ;
gas:out ?work ;
gas:linkType wdt:P50 ;
}
?work wdt:P50 ?author
}
} # UNION END
}
} AS %result
WHERE {
INCLUDE %result
SERVICE wikibase:label { bd:serviceParam wikibase:language "en,da,de,es,fr,he,jp,nl,no,ru,sv,zh" . }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.