query-6c9f8b131289ce365dcbe67a0f2f218c

rq turtle/ttl

بيانات جائزة الأوسكار (Q5)human (Q19020)Academy Awards items used: Academy award data (Q5)human (Q19020)Academy Awards items used: Dades de premis de l'Acadèmia (Q5)human (Q19020)Academy Awards items used: Údaje o Oskarovi (Q5)human (Q19020)Academy Awards items used: Academy award data (Q5)human (Q19020)Academy Awards items used: Academy award data (Q5)human (Q19020)Academy Awards items used: Academy award data (Q5)human (Q19020)Academy Awards items used: Academy award data (Q5)human (Q19020)Academy Awards items used: Academy award data (Q5)human (Q19020)Academy Awards items used: Academy award data (Q5)human (Q19020)Academy Awards items used: Academy award data (Q5)human (Q19020)Academy Awards items used: Données sur les Oscars (Q5)human (Q19020)Academy Awards items used: נתוני פרסי האקדמיה (Q5)human (Q19020)Academy Awards items used: Academy award data (Q5)human (Q19020)Academy Awards items used: Academy award data (Q5)human (Q19020)Academy Awards items used: Dati del premio Oscar (Q5)human (Q19020)Academy Awards items used: アカデミー賞のデータ (Q5)human (Q19020)Academy Awards items used: 아카데미상 데이터 (Q5)human (Q19020)Academy Awards items used: Academy award data (Q5)human (Q19020)Academy Awards items used: Academy award data (Q5)human (Q19020)Academy Awards items used: Academy award data (Q5)human (Q19020)Academy Awards items used: Academy award gegevens (Q5)human (Q19020)Academy Awards items used: Academy award data (Q5)human (Q19020)Academy Awards items used: Academy award data (Q5)human (Q19020)Academy Awards items used: Academy award data (Q5)human (Q19020)Academy Awards items used: Academy award data (Q5)human (Q19020)Academy Awards items used: Academy award data (Q5)human (Q19020)Academy Awards items used: Oscars-data (Q5)human (Q19020)Academy Awards items used: Academy award data (Q5)human (Q19020)Academy Awards items used: Academy award data (Q5)human (Q19020)Academy Awards items used: Дані премій «Оскар» (Q5)human (Q19020)Academy Awards items used: Academy award data (Q5)human (Q19020)Academy Awards items used: 学院奖数据 (Q5)human (Q19020)Academy Awards items used:

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?human ?humanLabel ?awardEditionLabel ?awardLabel ?awardWork ?awardWorkLabel ?director ?directorLabel ?time
WHERE
{
  {
    SELECT (SAMPLE(?human) AS ?human) ?award ?awardWork (SAMPLE(?director) AS ?director) (SAMPLE(?awardEdition) AS ?awardEdition) (SAMPLE(?time) AS ?time) WHERE {
      ?award wdt:P31 wd:Q19020 .      # All items that are instance of(P31) of Academy awards (Q19020)
      {
        ?human p:P166 ?awardStat .              # Humans with an awarded(P166) statement
        ?awardStat ps:P166 ?award .        # ... that has any of the values of ?award
        ?awardStat pq:P805 ?awardEdition . # Get the award edition (which is "subject of" XXth Academy Awards)
        ?awardStat pq:P1686 ?awardWork . # The work they have been awarded for
        ?human wdt:P31 wd:Q5 .        # Humans
      } UNION {
        ?awardWork wdt:P31 wd:Q11424 . # Films
        ?awardWork p:P166 ?awardStat . # ... with an awarded(P166) statement
        ?awardStat ps:P166 ?award .        # ... that has any of the values of ?award
        ?awardStat pq:P805 ?awardEdition . # Get the award edition (which is "subject of" XXth Academy Awards)
      }
      OPTIONAL {
        ?awardEdition wdt:P585 ?time . # the "point of time" of the Academy Award
        ?awardWork wdt:P57 ?director .
      }
    }
    GROUP BY ?awardWork ?award # We only want every movie once for a category (a 'random' person is selected)
  }

  SERVICE wikibase:label {            # ... include the labels
    bd:serviceParam wikibase:language "[AUTO_LANGUAGE],mul,en" .
  }
}
ORDER BY DESC(?time)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?award") v8("?awardEdition") v4("?awardStat") v6("?awardWork"):::projected v8("?director"):::projected v8("?human"):::projected v8("?time"):::projected c2(["wd:Q19020"]):::iri c14(["#91;AUTO_LANGUAGE#93;,mul,en"]):::literal c12(["bd:serviceParam"]):::iri c7(["wd:Q5"]):::iri c8(["wd:Q11424"]):::iri v2 --"p:direct/P31"--> c2 subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; v6 --"p:direct/P31"--> c8 v6 --"p:P166"--> v4 v4 --"p:statement/P166"--> v2 v4 --"p:qualifier/P805"--> v8 end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v8 --"p:P166"--> v4 v4 --"p:statement/P166"--> v2 v4 --"p:qualifier/P805"--> v8 v4 --"p:qualifier/P1686"--> v6 v8 --"p:direct/P31"--> c7 end union0r <== or ==> union0l end subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v8 -."p:direct/P585".-> v8 v6 --"p:direct/P57"--> v8 end bind4[/"sample(?human)"/] v8 --o bind4 bind4 --as--o v8 bind5[/"sample(?director)"/] v8 --o bind5 bind5 --as--o v8 bind6[/"sample(?awardEdition)"/] v8 --o bind6 bind6 --as--o v8 bind7[/"sample(?time)"/] v8 --o bind7 bind7 --as--o v8 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c12 --"wikibase:language"--> c14 end