User:Florentyna

From Wikidata
Jump to navigation Jump to search

Links[edit]

Badminton players without citizenship[edit]

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 without gender[edit]

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 players[edit]

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 type[edit]

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 labels[edit]

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 labels[edit]

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 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( 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-hant[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( 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-ID[edit]

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 Wikidata[edit]

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 tournaments[edit]

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 language[edit]

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

Try it!

No backlinks[edit]

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 de[edit]

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-ID[edit]

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 2017[edit]

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 gender[edit]

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-ID[edit]

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 Games[edit]

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

Try it!

Search for point in time[edit]

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 time[edit]

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 romanization[edit]

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!

Mandantory language option for name in native language[edit]

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