query-6fb902fd3bd8d199f42706e4b31f2a29
TODO Timeline of legalization of same-sex marriages
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 bd: <http://www.bigdata.com/rdf#>
#defaultView:Timeline
SELECT DISTINCT ?marriage ?marriageLabel ?time ?image
{
{
SELECT ?marriage ?time {
?marriage wdt:P31|wdt:P279 wd:Q17422;
wdt:P580 ?time.
}
}
UNION {
SELECT ?marriage ?time {
?marriage wdt:P31|wdt:P279 wd:Q17422;
wdt:P585 ?time.
}
}
OPTIONAL{
?marriage wdt:P18 ?image.
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
Query found at
- https://www.wikidata.org/wiki/Wikidata:WikiProject_LGBT/Queries
- https://www.wikidata.org/wiki/Wikidata:WikiProject_LGBT/Queries/Timeline_of_legalization_of_same-sex_marriages
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?image"):::projected
v1("?marriage"):::projected
v2("?time"):::projected
c8(["bd:serviceParam"]):::iri
c10(["#91;AUTO_LANGUAGE#93;,en"]):::literal
c2(["wd:Q17422"]):::iri
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
subgraph union1[" Union "]
subgraph union1l[" "]
style union1l fill:#abf,stroke-dasharray: 3 3;
v1 --"wdt:P279"--> c2
end
subgraph union1r[" "]
style union1r fill:#abf,stroke-dasharray: 3 3;
v1 --"wdt:P31"--> c2
end
union1r <== or ==> union1l
end
v1 --"wdt:P585"--> v2
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
subgraph union2[" Union "]
subgraph union2l[" "]
style union2l fill:#abf,stroke-dasharray: 3 3;
v1 --"wdt:P279"--> c2
end
subgraph union2r[" "]
style union2r fill:#abf,stroke-dasharray: 3 3;
v1 --"wdt:P31"--> c2
end
union2r <== or ==> union2l
end
v1 --"wdt:P580"--> v2
end
union0r <== or ==> union0l
end
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P18".-> v3
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c8 --"wikibase:language"--> c10
end