Open main menu

Contents

LinksEdit

Badminton players without citizenshipEdit

SELECT ?item ?itemLabel WHERE {
   ?item wdt:P31 wd:Q5 .
   ?item wdt:P106 wd:Q13141064 .
   FILTER NOT EXISTS { ?item wdt:P27 ?dummy0 }
   SERVICE wikibase:label {
     bd:serviceParam wikibase:language "en" .
   }
 }

Try it!

Badminton players from a specific country without birth dateEdit

SELECT ?item ?itemLabel WHERE {
   ?item wdt:P31 wd:Q5 .
   ?item wdt:P106 wd:Q13141064 .
   ?item wdt:P27 wd:Q668 .
   FILTER NOT EXISTS { ?item wdt:P569 ?dummy0 }
   SERVICE wikibase:label {
     bd:serviceParam wikibase:language "en" .
   }
 }

Try it!

Badminton players without genderEdit

SELECT ?item ?itemLabel WHERE {
   ?item wdt:P31 wd:Q5 .
   ?item wdt:P106 wd:Q13141064 .
   FILTER NOT EXISTS { ?item wdt:P21 ?dummy0 }
   SERVICE wikibase:label {
     bd:serviceParam wikibase:language "en" .
   }
 }

Try it!

Chinese badminton playersEdit

SELECT ?item ?itemLabel WHERE {
 ?item wdt:P106 wd:Q13141064 .
 { ?item wdt:P27 wd:Q148. }
 UNION
 { ?item wdt:P27 wd:Q865. }
 UNION
 { ?item wdt:P27 wd:Q14773. }
 UNION
 { ?item wdt:P27 wd:Q8646. }
 SERVICE wikibase:label {
 bd:serviceParam wikibase:language "zh" .
 }
 }

Try it!

Missing gender by tournament typeEdit

SELECT ?item ?itemLabel ?participantLabel WHERE {
  {
    SELECT ?item ?itemLabel ?participantLabel (CONTAINS(?participantLabel, "Women's") AS ?is_woman) WHERE {
      ?item wdt:P31 wd:Q5; wdt:P106 wd:Q13141064; wdt:P1344 ?participant .
      MINUS { ?item wdt:P21 [] } .
      SERVICE wikibase:label {
        bd:serviceParam wikibase:language "en" .
      } .
    }
  } .
  FILTER( ?is_woman = true ) .
  #FILTER( ?is_woman = false ) . 
  #false is not the correct solution, because Mixed doubles will listed there, too
}

Try it!

Missing labelsEdit

SELECT ?item ?itemLabel ?itemDescription ?emptyOtherLanguageLabel WHERE {
  ?item wdt:P106 wd:Q13141064 .
  OPTIONAL {
    ?item rdfs:label ?emptyOtherLanguageLabel .
  	FILTER( LANG(?emptyOtherLanguageLabel) = "fr" ) . 
  }
  FILTER(!BOUND(?emptyOtherLanguageLabel))
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
}

Try it! Replace rdfs:label by schema:description for missing descriptions. Replace "fr" by another language code for another missing language.

Number of Chinese labelsEdit

SELECT ?item ?itemLabel ?numberOfDifferentChineseLabels WHERE {
  {
    SELECT ?item (COUNT(DISTINCT ?plainlabel) AS ?numberOfDifferentChineseLabels) WHERE {
      {
        SELECT ?item WHERE {
          ?item wdt:P106 wd:Q13141064 .
        }
      }
      OPTIONAL {
        ?item rdfs:label ?label .
        BIND(STR(?label) AS ?plainlabel) .
      }
      FILTER( SUBSTR(LANG(?label), 0, 2) = "zh" ) . 
      FILTER( BOUND(?label) ) .
    } GROUP BY ?item
  }
  FILTER(?numberOfDifferentChineseLabels > 0) .
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
} ORDER BY DESC(?numberOfDifferentChineseLabels)

Try it!

Chinese labels per all Chinese languages incl. yue and wuuEdit

SELECT ?item ?itemLabel ?plainlabel (GROUP_CONCAT(?lang; separator=", ") as ?langs) WHERE {
  {
    SELECT ?item WHERE {
      ?item wdt:P106 wd:Q13141064 .
    }
  }
  OPTIONAL {
    ?item rdfs:label ?label .
    BIND(STR(?label) AS ?plainlabel) .
    BIND(LANG(?label) AS ?lang) .
  }
  FILTER( REGEX(LANG(?label), '^(zh.*|yue|wuu)$') ) . 
  FILTER( BOUND(?label) ) .
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
} GROUP BY ?item ?itemLabel ?plainlabel ORDER BY ASC(?item)

Try it!

Chinese labels per ZH-Chinese languages (without yue and wuu)Edit

SELECT ?item ?itemLabel ?plainlabel (GROUP_CONCAT(?lang; separator=", ") as ?langs) WHERE {
  {
    SELECT ?item WHERE {
      ?item wdt:P106 wd:Q13141064 .
    }
  }
  OPTIONAL {
    ?item rdfs:label ?label .
    BIND(STR(?label) AS ?plainlabel) .
    BIND(LANG(?label) AS ?lang) .
  }
  FILTER( SUBSTR(LANG(?label), 0, 2) = "zh" ) . 
  FILTER( BOUND(?label) ) .
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
} GROUP BY ?item ?itemLabel ?plainlabel ORDER BY ASC(?item)

Try it!

Comparison of zh-hans and zh-hantEdit

SELECT ?item ?itemLabel ?plainlabel (GROUP_CONCAT(?lang; separator=", ") as ?langs) WHERE {
  {
    SELECT ?item WHERE {
      ?item wdt:P106 wd:Q13141064 .
    }
  }
  OPTIONAL {
    ?item rdfs:label ?label .
    BIND(STR(?label) AS ?plainlabel) .
    BIND(LANG(?label) AS ?lang) .
  }
  FILTER( LANG(?label) = "zh-hant" ) .
  FILTER( BOUND(?label) ) .
  SERVICE wikibase:label { bd:serviceParam wikibase:language "zh-hans" }
} GROUP BY ?item ?itemLabel ?plainlabel ORDER BY ASC(?item)

Try it!

Sports-Reference without BWF-IDEdit

SELECT ?item ?itemLabel WHERE {
   ?item wdt:P106 wd:Q13141064 .
   FILTER EXISTS { ?item wdt:P1447 ?dummy0 }
   FILTER NOT EXISTS { ?item wdt:P2729 ?dummy0 }
   SERVICE wikibase:label {
     bd:serviceParam wikibase:language "en" .
   }
 }

Try it!

Article in a specific Wiki with a property on WikidataEdit

SELECT ?item ?itemLabel WHERE {
   ?item wdt:P31 wd:Q5 .
   ?item wdt:P106 wd:Q13141064 .
		FILTER EXISTS { ?wen schema:about ?item . ?wen schema:inLanguage "de" }
		SERVICE wikibase:label {
		bd:serviceParam wikibase:language "de,en" .
	}
}
GROUP BY ?item ?itemLabel

Try it!

Participants of tournamentsEdit

SELECT ?item ?itemLabel ?participantLabel WHERE {
  {
    SELECT ?item ?itemLabel ?participantLabel (CONTAINS(?participantLabel, "Bangladesh Badminton") AS ?is_Bangla) WHERE {
      ?item wdt:P31 wd:Q5; wdt:P106 wd:Q13141064; wdt:P1344 ?participant .
      SERVICE wikibase:label {
        bd:serviceParam wikibase:language "en" .
      } .
    }
  } .
  FILTER( ?is_Bangla = true ) .
}

Try it!

Missing name in native languageEdit

SELECT ?item ?itemLabel ?countryLabel WHERE {
   ?item wdt:P106 wd:Q13141064; wdt:P27 ?country .
   FILTER EXISTS { ?item wdt:P27 ?dummy0 }
   FILTER EXISTS { ?item wdt:P106 wd:Q13141064 }
   FILTER NOT EXISTS { ?item wdt:P1559 ?dummy0 }
   SERVICE wikibase:label {
     bd:serviceParam wikibase:language "en" .
   }
 }
ORDER BY ?countryLabel

Try it!

No backlinksEdit

SELECT DISTINCT ?item 
WHERE
{
  ?item wikibase:sitelinks 0 .
  ?item wdt:P31 wd:Q5 .
  ?item wdt:P21 ?dummy1 .
   ?item wdt:P106 wd:Q13141064 .
  OPTIONAL{
    ?backlink ?p1 ?item .
  }
  FILTER(!bound(?backlink))  
  OPTIONAL{
    ?item ?claim ?dummy0 .
    ?property wikibase:propertyType wikibase:ExternalId .
    ?property wikibase:directClaim ?claim
  }
  FILTER(!bound(?dummy0))
  OPTIONAL{
    ?item ?p2 [prov:wasDerivedFrom ?ref] .
    ?ref ?pr [] .
  }  
  FILTER(!bound(?ref))
}
Limit 100

Try it!

Article in en not in deEdit

SELECT DISTINCT ?item 
SELECT ?item ?itemLabel WHERE {
   ?item wdt:P641 wd:Q7291 .
  FILTER EXISTS { ?wen schema:about ?item . ?wen schema:inLanguage "en" }
  FILTER NOT EXISTS { ?wde schema:about ?item . ?wde schema:inLanguage "de" }
		SERVICE wikibase:label {
		bd:serviceParam wikibase:language "de,en" .
	}
}
GROUP BY ?item ?itemLabel

Try it!

Athletes without CGF-IDEdit

SELECT ?item ?itemLabel ?participantLabel WHERE {
  {
    SELECT ?item ?itemLabel ?participantLabel (CONTAINS(?participantLabel, "Commonwealth") AS ?is_Bangla) WHERE {
      ?item wdt:P31 wd:Q5; wdt:P106 wd:Q13141064; wdt:P1344 ?participant .
      SERVICE wikibase:label {
        bd:serviceParam wikibase:language "en" .
      } .
    }
  } .
  FILTER( ?is_Bangla = true ) .
  FILTER NOT EXISTS { ?item wdt:P4548 ?dummy0 }
}

Try it!

Tournaments in 2017Edit

SELECT ?item ?itemLabel WHERE {
  ?item wdt:P279 wd:Q13357858 .
  ?item wdt:P585 ?_publication_date .
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
FILTER (?_publication_date = "2017-00-00T00:00:00Z"^^xsd:dateTime)
}

Try it!

Wrong genderEdit

SELECT ?item ?itemLabel ?participantLabel WHERE {
  {
    SELECT ?item ?itemLabel ?participantLabel (CONTAINS(?participantLabel, "Women") AS ?is_Bangla) WHERE {
      ?item wdt:P31 wd:Q5; wdt:P106 wd:Q13141064; wdt:P21 wd:Q6581097; wdt:P1344 ?participant .
      SERVICE wikibase:label {
        bd:serviceParam wikibase:language "en" .
      } .
    }
  } .
  FILTER( ?is_Bangla = true ) .
}

Try it!

Participants of tournaments in the 1990s without BWF-IDEdit

SELECT ?item ?itemLabel ?participantLabel WHERE {
  {
    SELECT ?item ?itemLabel ?participantLabel (CONTAINS(?participantLabel, "199") AS ?is_Bangla) WHERE {
      ?item wdt:P31 wd:Q5; wdt:P106 wd:Q13141064; wdt:P1344 ?participant .
      SERVICE wikibase:label {
        bd:serviceParam wikibase:language "en" .
      } .
    }
  } .
  FILTER( ?is_Bangla = true ) .
  FILTER NOT EXISTS { ?item wdt:P2729 ?dummy0 }
}

Try it!

Participants of Asian GamesEdit

SELECT ?item ?itemLabel WHERE {
   ?item wdt:P106 wd:Q13141064 .
   ?item wdt:P1344 wd:Q495366
   SERVICE wikibase:label {
     bd:serviceParam wikibase:language "en" .
   }
 }

Try it!

Search for point in timeEdit

SELECT ?item ?itemLabel ?participantLabel WHERE {
  {
    SELECT ?item ?itemLabel ?participantLabel (CONTAINS(?participantLabel, "T00:00:00Z") AS ?is_Bangla) WHERE {
      ?item wdt:P279 wd:Q13357858; wdt:P585 ?participant .
      SERVICE wikibase:label {
        bd:serviceParam wikibase:language "en" .
      } .
    }
  } .
  FILTER( ?is_Bangla = true ) .
  FILTER EXISTS { ?item wdt:P585 ?dummy0 }
        }

Try it!

Start and end timeEdit

SELECT ?item ?itemLabel ?_start ?_end ?_instanceLabel
WHERE {
   ?item wdt:P279 wd:Q13357858 .
   FILTER EXISTS  { ?item wdt:P580 ?dummy0 }
   ?item wdt:P580 ?_start.
   ?item wdt:P582 ?_end.
   ?item wdt:P31 ?_instance.
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}

Try it!

Korean badminton players without McCune-Reischauer romanizationEdit

SELECT ?item ?itemLabel WHERE {
   ?item wdt:P31 wd:Q5 .
   ?item wdt:P106 wd:Q13141064 .
   ?item wdt:P27 wd:Q884 .
   FILTER NOT EXISTS { ?item wdt:P1942 ?dummy0 }
   SERVICE wikibase:label {
     bd:serviceParam wikibase:language "en" .
   }
 }

Try it!

Badminton players without IDs, participations, awards, worksEdit

SELECT ?item ?itemLabel WHERE {
   ?item wdt:P31 wd:Q5 .
   ?item wdt:P106 wd:Q13141064 .
   FILTER NOT EXISTS { ?item wdt:P1344 ?dummy0 }
   FILTER NOT EXISTS { ?item wdt:P2729 ?dummy0 }  
   FILTER NOT EXISTS { ?item wdt:P4548 ?dummy0 }
   FILTER NOT EXISTS { ?item wdt:P2868 ?dummy0 }
   FILTER NOT EXISTS { ?item wdt:P166 ?dummy0 }
   FILTER NOT EXISTS { ?item wdt:P800 ?dummy0 }
   FILTER NOT EXISTS { ?item wdt:P2581 ?dummy0 }
   FILTER NOT EXISTS { ?item wdt:P213 ?dummy0 }
   FILTER NOT EXISTS { ?item wdt:P214 ?dummy0 }
   FILTER NOT EXISTS { ?item wdt:P3620 ?dummy0 }
   FILTER NOT EXISTS {?article schema:about ?item } 
   FILTER NOT EXISTS { ?item wdt:P4042 ?dummy0 }
   FILTER NOT EXISTS { ?item wdt:P1741 ?dummy0 }
   FILTER NOT EXISTS { ?item wdt:P646 ?dummy0 }
   FILTER NOT EXISTS { ?item wdt:P4588 ?dummy0 }
   FILTER NOT EXISTS { ?item wdt:P3973 ?dummy0 }
   FILTER NOT EXISTS { ?item wdt:P166 ?dummy0 }
   FILTER NOT EXISTS { ?item wdt:P3171 ?dummy0 }
   FILTER NOT EXISTS { ?item wdt:P1447 ?dummy0 }
   FILTER NOT EXISTS { ?item wdt:P3417 ?dummy0 }
   FILTER NOT EXISTS { ?item wdt:P244 ?dummy0 }
   FILTER NOT EXISTS { ?item wdt:P3222 ?dummy0 }
   FILTER NOT EXISTS { ?item wdt:P4392 ?dummy0 }
   FILTER NOT EXISTS { ?item wdt:P2671 ?dummy0 }
   FILTER NOT EXISTS { ?item wdt:P1280 ?dummy0 }
   SERVICE wikibase:label {
   bd:serviceParam wikibase:language "en" .
   }
 }

Try it!

Badminton people without a specific language labelEdit

SELECT ?item ?itemLabel ?itemDescription WHERE {
   ?item wdt:P31 wd:Q5 .
   ?item wdt:P641 wd:Q7291 .

 SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
 FILTER(NOT EXISTS {
   ?item rdfs:label ?lang_label.
   FILTER(LANG(?lang_label) = "eml") #with missing eml label
 })
}
ORDER BY ?itemLabel

Try it!

Locations of events with partsEdit

SELECT ?item ?itemLabel ?location ?haspart WHERE {
   ?item wdt:P279 wd:Q13357858; wdt:P276 ?location; wdt:P527 ?haspart.
   FILTER EXISTS { ?item wdt:P527 ?dummy0 }
   FILTER EXISTS { ?item wdt:P276 ?dummy0 }
   SERVICE wikibase:label {
     bd:serviceParam wikibase:language "en" .
   }
 }

Try it!

Norwegian badminton playersEdit

SELECT ?item ?itemLabel WHERE {
   ?item wdt:P31 wd:Q5 .
   ?item wdt:P106 wd:Q13141064 .
   ?item wdt:P27 wd:Q20 . 
   SERVICE wikibase:label {
     bd:serviceParam wikibase:language "en" .
   }
 }
ORDER BY ?itemLabel

Try it!

Location of main tournament page to parts of tournamentEdit

SELECT ?item ?itemLabel ?participant ?participantLabel ?location WHERE {
   ?item wdt:P17 wd:Q35; wdt:P279 wd:Q13357858; wdt:P527 ?participant; wdt:P276 ?location .
   SERVICE wikibase:label {
     bd:serviceParam wikibase:language "en" .
   }
 }

Try it!

Japanese name without kanaEdit

SELECT ?item ?itemLabel WHERE {
   ?item wdt:P27 wd:Q17 .
   ?item wdt:P106 wd:Q13141064 .
   FILTER EXISTS { ?item wdt:P1559 ?dummy0 }
   FILTER NOT EXISTS { ?item wdt:P1814 ?dummy0 }
   SERVICE wikibase:label {
     bd:serviceParam wikibase:language "en" .
   }
 }

Try it!

Japanese translationsEdit

SELECT ?item ?itemLabel ?participantLabel WHERE {
   ?item wdt:P27 wd:Q17; wdt:P106 wd:Q13141064; wdt:P1559 ?participant .
   FILTER EXISTS { ?item wdt:P1559 ?dummy0 }
   SERVICE wikibase:label {
     bd:serviceParam wikibase:language "en" .
   }
 }

Try it!

Category check for correct locationEdit

SELECT ?cat ?catLabel ?location ?locationLabel {
  ?cat p:P4224[ps:P4224 wd:Q13357858; pq:P276 ?location]
  SERVICE wikibase:label { bd:serviceParam wikibase:language "de" }
}

Try it!

Category of locations to location for tournamentsEdit

PREFIX mw: <http://tools.wmflabs.org/mw2sparql/ontology#>
SELECT DISTINCT ?tournament ?tournamentLabel ?location ?locationLabel {
  hint:Query hint:optimizer "None" .
  ?cat p:P4224[ps:P4224 wd:Q13357858; pq:P276 ?location] .
  ?catArticle schema:about ?cat
  SERVICE <http://tools.wmflabs.org/mw2sparql/sparql> {
    ?page mw:inCategory ?catArticle
  }
  ?page schema:about ?tournament . ?tournament wdt:P279 wd:Q13357858
  FILTER NOT EXISTS { ?tournament wdt:P276 [] } 
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en,de" }
}

Try it!

Locations for Part-of-tournamentsEdit

SELECT ?parts ?partsLabel ?location ?locationLabel {
  ?tournament wdt:P279 wd:Q13357858; wdt:P276 ?location; wdt:P527 ?parts .
  ?parts wdt:P279 wd:Q13357858
  FILTER NOT EXISTS { ?parts wdt:P276 [] }
  FILTER NOT EXISTS { ?parts wdt:P2094 wd:Q63874701 }
  FILTER NOT EXISTS { ?parts wdt:P3085 [] }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en,de" }
}

Try it!

Missing locations for for a specific countryEdit

SELECT ?item ?itemLabel WHERE {
  ?item wdt:P279 wd:Q13357858 .
  ?item wdt:P17 wd:Q145 .
  FILTER NOT EXISTS { ?item wdt:P31 wd:Q18608583 }
  FILTER NOT EXISTS { ?item wdt:P276 ?dummy0 }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}

Try it!

Missing description in enEdit

SELECT ?item ?itemLabel ?genderLabel ?itemDescription WHERE {
  ?item wdt:P641 wd:Q7291.  # instance of human
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en,de,it,es,pt,no". }
  FILTER(NOT EXISTS {
    ?item schema:description ?itemdesc.
    FILTER(LANG(?itemdesc) = "en") # with missing Dutch description
  })
}
order by ?itemLabel

Try it!

Mandantory language option for name in native languageEdit

Q4115189<TAB>P1559<TAB>en:"Name" should work (adding the English monolingual text "Name" to P1559 of Q4115189 in this case).