Wikidata:WikiProject Human rights/Example Queries
Jump to navigation
Jump to search
Try it!
For now, this project is aiming to compile information about prisoners of conscience.
Goals:
- Define correct usage of properties and qualifiers for prisoners of conscience.
- Fill missing information (for instance place of detention) for prisoners of conscience who already have a Wikidata item.
The query below displays all prisoners of conscience, together with information about them:
SELECT ?item ?itemLabel ?placeOfDetentionLabel ?countryOfDetentionLabel ?startDate ?endDate ?image
WHERE
{
?item wdt:P793 wd:Q4667873.
OPTIONAL{
?item wdt:P2632 ?placeOfDetention.
?placeOfDetention wdt:P17 ?countryOfDetention.
OPTIONAL{
?item p:P2632 ?startStatement.
?startStatement pq:P580 ?startDate.
}
OPTIONAL{
?item p:P2632 ?endStatement.
?endStatement pq:P582 ?endDate.
}
}
OPTIONAL{?item wdt:P18 ?image.}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY DESC(?countryOfDetention)