query-507b7ca6a9970ef08c6210e6644e900b
Getting the point-in-time of a property?I think I'm confused about property hierarchy. (And maybe using the wrong terminology). For this query:
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?pl ?signatory ?date2 ?short ?itemLabel (CONCAT("Public Law ",?pl, ". ", STRBEFORE(?stat,"-"), " Stat ", STRAFTER(?stat,"-"),".") as ?text)
WHERE {
?item wdt:P3825 ?stat ;
wdt:P3837 ?pl .
OPTIONAL { ?item wdt:P585 ?date . }
OPTIONAL { ?item wdt:P1813 ?short . }
OPTIONAL { ?item p:P1891 ?signatory .
#?signatory wdt:P585 ?date2 .
}
OPTIONAL {
}
FILTER (CONTAINS(?pl, '116-')) .
SERVICE wikibase:label { bd:serviceParam wikibase:language "en,en" }
}
LIMIT 10
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?date")
v2("?item"):::projected
v1("?pl"):::projected
v5("?short"):::projected
v6("?signatory"):::projected
v3("?stat"):::projected
v7("?text")
c8(["bd:serviceParam"]):::iri
c10(["en,en"]):::literal
f0[["contains(?pl,'116-')"]]
f0 --> v1
v2 --"p:direct/P3825"--> v3
v2 --"p:direct/P3837"--> v1
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v2 -."p:direct/P585".-> v4
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v2 -."p:direct/P1813".-> v5
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v2 -."p:P1891".-> v6
end
subgraph optional3["(optional)"]
style optional3 fill:#bbf,stroke-dasharray: 5 5;
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c8 -."wikibase:language".-> c10
end
bind1[/"concat('Public Law ',?pl,'. ',substring-before(?stat,'-'),' Stat ',substring-after(?stat,'-'),'.')"/]
v1 --o bind1
v3 --o bind1
bind1 --as--o v7