User:Mr. Ibrahem/queries

From Wikidata
Jump to navigation Jump to search
category combines topics (P971)

The following query uses these:

P641[edit]

The following query uses these:

  • Properties: instance of (P31)  View with Reasonator View with SQID, subclass of (P279)  View with Reasonator View with SQID, sport (P641)  View with Reasonator View with SQID, point in time (P585)  View with Reasonator View with SQID, start time (P580)  View with Reasonator View with SQID, end time (P582)  View with Reasonator View with SQID
    SELECT ?P641 ?P641Label (COUNT(?P641) AS ?ct) WHERE {
      { ?item wdt:P31 wd:Q1194951. }
      UNION
      {
        ?item wdt:P31 ?mm.
        ?mm wdt:P279 wd:Q8031011.
      }
      UNION
      {
        ?item (wdt:P31/(wdt:P279*)) ?P279.
        ?P279 wdt:P279 wd:Q1194951.
      }
      ?item wdt:P641 ?P641.
      FILTER(NOT EXISTS { ?item wdt:P31 wd:Q23726798. })
      FILTER(NOT EXISTS { ?item wdt:P31 wd:Q1477115. })
      FILTER(NOT EXISTS { ?item wdt:P585 ?P585. })
      FILTER(NOT EXISTS { ?item wdt:P580 ?P585. })
      FILTER(NOT EXISTS { ?item wdt:P582 ?P585. })
      ?item wikibase:sitelinks ?sl.
      FILTER(NOT EXISTS {
        _:b2 schema:about ?item;
          schema:isPartOf <https://ar.wikipedia.org/>.
      })
      ?item rdfs:label ?arabicc.
      FILTER((LANG(?arabicc)) = "ar")
      SERVICE wikibase:label { bd:serviceParam wikibase:language "ar,en". }
      FILTER(?sl > 0 )
    }
    GROUP BY ?P641 ?P641Label
    ORDER BY DESC (?ct)
    LIMIT 1000