Help
Difference between revisions of "SPARQL"
Line 13: | Line 13: | ||
SELECT ?item ?itemLabel | SELECT ?item ?itemLabel | ||
WHERE { | WHERE { | ||
− | ?item prop:P2* entity:Q7 | + | ?item prop:P2/prop:P9 * entity:Q7 |
SERVICE wikibase:label { | SERVICE wikibase:label { | ||
bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" . | bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" . | ||
Line 20: | Line 20: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
| | | | ||
− | <query _pagination=" | + | <query _pagination="6" item="Property" itemLabel="Values"> |
SELECT ?item ?itemLabel | SELECT ?item ?itemLabel | ||
WHERE { | WHERE { | ||
Line 30: | Line 30: | ||
</query> | </query> | ||
|} | |} | ||
+ | |||
== ✅ Query → list all speakers == | == ✅ Query → list all speakers == | ||
{| | {| |
Revision as of 23:45, 3 December 2021
Base
- Special:ListProperties
- List of properties with possible values. Ex: Gender (P8) : male (male (Q16)), female (female (Q17)), intersex (intersex (Q18)).
- LinguaLibre:List of languages
- DataViz:Speakers
- DataViz:Records
✅ Property Gender(Q7) → list all possible values
SELECT ?item ?itemLabel
WHERE {
?item prop:P2/prop:P9 * entity:Q7
SERVICE wikibase:label {
bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" .
}
}
|
|
✅ Query → list all speakers
select ?locutor ?locutorLabel
where {
?locutor prop:P2 entity:Q3 .
SERVICE wikibase:label {
bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" .
}
}
|
|