User:Matthias Erfurth/Boetticher

From FactGrid
Jump to navigation Jump to search
Malerwerke des neunzehnten Jahrhunderts : Beitrag zur Kunstgeschichte, Item:Q537641

Queries

#title:Alle Personen, die im Boetticher gelistet sind
SELECT ?item ?itemLabel ?gender
WHERE 
{
  ?item wdt:P124 wd:Q537641.
  ?item wdt:P154 ?gender
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} ORDER BY ?itemLabel

Try It!

#defaultView:Table

# Prefixes
PREFIX fg: <https://database.factgrid.de/entity/>
PREFIX fgt: <https://database.factgrid.de/prop/direct/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX bd: <http://www.bigdata.com/rdf#>
PREFIX schema: <http://schema.org/>

SELECT DISTINCT  ?fg_itemLabel ?wd_item ?fg_item_as_string  where {
    # labels from Factgrid
    SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } 
    # maybe filter to prevent timeout
    ?fg_item fgt:P165 fg:Q36783.
    # Convert Factgrid ID from IRI to string
    BIND(REPLACE(STR(?fg_item), "https://database.factgrid.de/entity/", "") as ?fg_item_as_string) 
    # get those Items from Wikidata that have that corresponding Factgrid ID and listed in Boetticher
    SERVICE <https://query.wikidata.org/sparql> {
      ?wd_item wdt:P8168 ?fg_item_as_string.
      ?wd_item wdt:P1343 wd:Q72628185.
    }
}

Try it!