EChO IMAGES:SPARQL/examples
Queries on EChO IMAGES
Inventors
PREFIX wbt: <https://wikibase.echoimages.labs.wikimedia.pt/prop/direct/>
PREFIX wb: <https://wikibase.echoimages.labs.wikimedia.pt/entity/>
SELECT ?item ?itemLabel ?inventor ?inventorLabel WHERE {
?item wbt:P3 wb:Q66 .
OPTIONAL { ?item wdt:P79 ?inventor . }
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
Wikidata
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT ?item ?itemLabel ?inventor ?inventorLabel WHERE {
?item wdt:P31 wd:Q172839 .
OPTIONAL { ?item wdt:P61 ?inventor . }
SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}
image location
PREFIX wbt: <https://wikibase.echoimages.labs.wikimedia.pt/prop/direct/>
PREFIX wb: <https://wikibase.echoimages.labs.wikimedia.pt/entity/>
SELECT ?image ?item ?itemLabel ?creator ?creatorLabel ?method ?methodLabel ?inception ?location WHERE {
?item wbt:P3 wb:Q56 .
?item wbt:P6 ?image .
?item wbt:P10 ?location .
?item wbt:P13 ?inception .
?item wbt:P28 ?method .
OPTIONAL { ?item wbt:P16 ?creator . }
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
Wikidata
SELECT DISTINCT ?image ?item ?itemLabel ?creator ?creatorLabel ?method ?methodLabel ?inception ?location ?depicoord WHERE {
?item wdt:P31/wdt:P279* wd:Q125191 .
?item wdt:P18 ?image .
# ?item wdt:P625 ?location .
?item wdt:P9149 ?depicoord .
?item wdt:P571 ?inception .
?item wdt:P2079 ?method .
OPTIONAL { ?item wdt:P170 ?creator . }
SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}
Industry
Wikidata
SELECT ?item ?itemLabel ?inventor ?inventorLabel WHERE {
?item wdt:P452 wd:Q1439700 .
SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}
Women in photography
Wikidata
SELECT DISTINCT ?image ?item ?itemLabel ?birth ?country ?countryLabel WHERE {
?item wdt:P106 wd:Q33231 .
?item wdt:P27 ?country .
?item wdt:P18 ?image .
# ?item wdt:P625 ?location .
# ?item wdt:P571 ?inception .
# ?item wdt:P2079 ?method .
?item wdt:P569 ?birth;
wdt:P21 wd:Q6581072;
FILTER (?birth > "1790-01-01"^^xsd:dateTime && ?birth < "2026-01-01"^^xsd:dateTime)
# OPTIONAL { ?item wdt:P170 ?creator . }
SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}
federeted query not working
PREFIX wbt: <https://wikibase.echoimages.labs.wikimedia.pt/prop/direct/>
SELECT ?item ?itemlabel ?ec ?eclabel WHERE {
?ec wbt:P114 ?qid ; rdfs:label ?eclabel . FILTER(LANG(?eclabel) = "en")
BIND(URI(CONCAT("http://www.wikidata.org/entity/",?qid)) AS ?item)
SERVICE <https://query.wikidata.org/sparql/> #https://qlever.dev/api/wikidata
{ ?item wdt:P279 wd:Q16135865 ; rdfs:label ?itemlabel . FILTER(LANG(?itemlabel) = "en") . } .
}
Direct Claim
Wikidata
SELECT ?item ?itemLabel ?property ?propertyLabel
WHERE {
?item ?wdt wd:Q84186 .
?property wikibase:directClaim ?wdt .
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],mul,en". }
}
Echoimages properties
Queries on Wikidata
- All photographers
- Countries of citizenship of photographers
- List of the countries of citizenship with English label and coordinates (QLever)
- List of female photographers with country of citizenship and birthdate (QLever)
- List of female photographers with country of citizenship, birthdate, deathdate, image (QLever)
- List of female photographers with country of citizenship, birthdate, image, no deathdate (QLever)