query-c28f5619db47f845ac9a05976945f7b8
Sample to query all values of a property
Property talk pages on Wikidata include basic queries adapted to each property
SELECT ?item ?itemLabel ?value ?valueLabel
valueLabel is only useful for properties with item-datatype
WHERE
{
?item wdt:P1800 ?value
# change P1800 to another property
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
remove or change limit for more results
LIMIT 10
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX bd: <http://www.bigdata.com/rdf#>
# Sample to query all values of a property
# Property talk pages on Wikidata include basic queries adapted to each property
SELECT
?item ?itemLabel
?value ?valueLabel
# valueLabel is only useful for properties with item-datatype
WHERE
{
?item wdt:P1800 ?value
# change P1800 to another property
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
# remove or change limit for more results
LIMIT 10
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?item"):::projected
v2("?value"):::projected
c3(["bd:serviceParam"]):::iri
c5(["#91;AUTO_LANGUAGE#93;,en"]):::literal
v1 --"wdt:P1800"--> v2
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c3 --"wikibase:language"--> c5
end