query-eb5af644f07f7d6c2ae938d424aa9516
journalists with aliases for downstream processing SELECT DISTINCT ?item ?itemLabel ?genderLabel (URI(?url) AS ?lien) ?itemAltLabel WHERE { ?item wdt:P31 wd:Q5; p:P6872 ?n. ?n ps:P6872 wd:Q164746. OPTIONAL { ?item wdt:P21 ?gender. } OPTIONAL { ?n pq:P2699 ?url. } SERVICE wikibase:label { bd:serviceParam wikibase:language "en,fr". } } ORDER BY ?itemLabel
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
# journalists with aliases for downstream processing
SELECT DISTINCT ?item ?itemLabel ?genderLabel (URI(?url) AS ?lien) ?itemAltLabel WHERE {
?item wdt:P31 wd:Q5;
p:P6872 ?n.
?n ps:P6872 wd:Q164746.
OPTIONAL { ?item wdt:P21 ?gender. }
OPTIONAL { ?n pq:P2699 ?url. }
SERVICE wikibase:label { bd:serviceParam wikibase:language "en,fr". }
}
ORDER BY ?itemLabel
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?gender")
v2("?item"):::projected
v1("?itemLabel"):::projected
v6("?lien")
v3("?n")
v5("?url"):::projected
c9(["bd:serviceParam"]):::iri
c5(["wd:Q164746"]):::iri
c2(["wd:Q5"]):::iri
c11(["en,fr"]):::literal
v2 --"p:direct/P31"--> c2
v2 --"p:P6872"--> v3
v3 --"p:statement/P6872"--> c5
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v2 -."p:direct/P21".-> v4
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v3 -."p:qualifier/P2699".-> v5
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c9 --"wikibase:language"--> c11
end
bind0[/"?url"/]
v5 --o bind0
bind0 --as--o v6