A set of SPARQL examples that are used in different TGX resources
Find your co-authors with your ORCID.
PREFIX wd: <http://wikidata.org/entity/>
PREFIX wdt: <http://wikidata.org/prop/direct/>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?coAuthor ?coAuthorLabel ?mastodon WHERE {
VALUES ?orcid { "0000-0001-7542-0286" }
?you ^wdt:P50 ?article ; wdt:P496 ?orcid . ?article wdt:P50 ?coAuthor .
?coAuthor wdt:P4033 ?mastodon .
FILTER ( ?coAuthor != ?you )
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?article")
v1("?coAuthor"):::projected
v5("?mastodon"):::projected
v3("?orcid")
v2("?you")
c5(["bd:serviceParam"]):::iri
c7(["#91;AUTO_LANGUAGE#93;,en"]):::literal
f0[["?coAuthor != ?you"]]
f0 --> v1
f0 --> v2
bind1[/VALUES ?orcid/]
bind1-->v3
bind10(["0000-0001-7542-0286"])
bind10 --> bind1
v4 --"wdt:P50"--> v2
v2 --"wdt:P496"--> v3
v4 --"wdt:P50"--> v1
v1 --"wdt:P4033"--> v5
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c5 --"wikibase:language"--> c7
end