query-23ca7735969e920e61e9dbf20a6016b1

rq turtle/ttl

self-portrait (Q192110)

Use at

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT DISTINCT 
    ?item
WHERE 
{
  {
    SELECT ?item {
        ?item wdt:P31/wdt:P279* wd:Q838948 .
        ?item rdfs:label ?name.
        wd:Q192110 rdfs:label ?nameA.

        # wykluczenie albumów
        MINUS{?item wdt:P31 wd:Q482994}.
        # wykluczenie filmów
        MINUS{?item wdt:P31 wd:Q11424}.
        # wykluczenie filmów krótkometrażowych
        MINUS{?item wdt:P31 wd:Q24862}.
        # wykluczenie naszyjników
        MINUS{?item wdt:P31 wd:Q189299}. 

        ?item wdt:P18 ?i

        # self-portrait, selfportrait, autoportrait, zelf ...
        FILTER(REGEX(?name, 
                     CONCAT("^.*(self[- ]?portrait|autoretrat|autorretrato|autoritratto|selbstporträt|selbstbildnis|autoportrait|", 
                            "автопортрет|zelf|självporträtt|portret własny|autoportre|painter.*portrait|selvportræt).*$"), 
                     "i") 
                     # || REGEX(?name, ?nameA, "i")
        ).

        MINUS{?item wdt:P136 wd:Q192110}.
        MINUS{?item wdt:P136 wd:Q60133444}.
        MINUS{?item wdt:P136 wd:Q12068677}.
        MINUS{?item wdt:P170 wd:Q4233718}.
        FILTER (?item NOT IN (wd:Q20177320, wd:Q20167246, wd:Q21856648, wd:Q17339410, wd:Q17427870, wd:Q2713823, wd:Q51485246,
                              wd:Q17559608, wd:Q24066171, wd:Q27277742, wd:Q28091974, wd:Q56395164, wd:Q26710446,
                          wd:Q19186181, wd:Q17539559, wd:Q17614153, wd:Q18809844, wd:Q17331927, wd:Q18686048, wd:Q30065032)).
      }
    }

}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v4("?i") v1("?item"):::projected v2("?name") v3("?nameA") a1((" ")) c26(["wd:Q838948"]):::iri c29(["wd:Q482994"]):::iri c32(["wd:Q189299"]):::iri c28(["wd:Q192110"]):::iri c30(["wd:Q11424"]):::iri c31(["wd:Q24862"]):::iri c35(["wd:Q60133444"]):::iri c38(["wd:Q4233718"]):::iri c36(["wd:Q12068677"]):::iri f0[["?item != 'wd:Q20177320'?item != 'wd:Q20167246'?item != 'wd:Q21856648'?item != 'wd:Q17339410'?item != 'wd:Q17427870'?item != 'wd:Q2713823'?item != 'wd:Q51485246'?item != 'wd:Q17559608'?item != 'wd:Q24066171'?item != 'wd:Q27277742'?item != 'wd:Q28091974'?item != 'wd:Q56395164'?item != 'wd:Q26710446'?item != 'wd:Q19186181'?item != 'wd:Q17539559'?item != 'wd:Q17614153'?item != 'wd:Q18809844'?item != 'wd:Q17331927'?item != 'wd:Q18686048'?item != 'wd:Q30065032'"]] f0 --> v1 f1[["regex(?name,concat('^.*(self#91;- #93;?portrait|autoretrat|autorretrato|autoritratto|selbstporträt|selbstbildnis|autoportrait|','автопортрет|zelf|självporträtt|portret własny|autoportre|painter.*portrait|selvportræt).*$'),'i')"]] f1 --> v2 v1 --"wdt:P31"--> a1 a1 --"wdt:P279"--> c26 v1 --"rdfs:label"--> v2 c28 --"rdfs:label"--> v3 subgraph minus2["MINUS"] style minus2 stroke-width:6px,fill:pink,stroke:red; v1 --"wdt:P31"--> c29 end subgraph minus3["MINUS"] style minus3 stroke-width:6px,fill:pink,stroke:red; v1 --"wdt:P31"--> c30 end subgraph minus4["MINUS"] style minus4 stroke-width:6px,fill:pink,stroke:red; v1 --"wdt:P31"--> c31 end subgraph minus5["MINUS"] style minus5 stroke-width:6px,fill:pink,stroke:red; v1 --"wdt:P31"--> c32 end v1 --"wdt:P18"--> v4 subgraph minus6["MINUS"] style minus6 stroke-width:6px,fill:pink,stroke:red; v1 --"wdt:P136"--> c28 end subgraph minus7["MINUS"] style minus7 stroke-width:6px,fill:pink,stroke:red; v1 --"wdt:P136"--> c35 end subgraph minus8["MINUS"] style minus8 stroke-width:6px,fill:pink,stroke:red; v1 --"wdt:P136"--> c36 end subgraph minus9["MINUS"] style minus9 stroke-width:6px,fill:pink,stroke:red; v1 --"wdt:P170"--> c38 end