User:MisterSynergy/rowing/queries
- rowing/queries
- rowing/P214 for rowers
- rowing/P3171 for rowers
- rowing/event participation
- rowing/unconnected pages
- badminton/queries
- tennis/queries
- sports/queries
- sports/P641 worklists
- sports/P1447 worklists
- sports/Olympics
- cultural heritage/Germany
- misc/linked deleted items
- misc/quantity data type
- misc/references
- misc/sitelink badges
- misc/unsorted worklists
Special:PrefixIndex/User:MisterSynergy/ • User:MisterSynergy/sysop/header • item statistics • patrol • pages with code • activity • jobs
Unsorted
editMissing P31/P279 of rowing items
editRowing persons with notability issues
editSELECT ?item ?itemLabel ?itemDescription ?statements WITH {
SELECT DISTINCT ?item WHERE {
?item p:P106/ps:P106/wdt:P279* wd:Q26270618 .
}
} AS %s WHERE {
INCLUDE %s .
?item wikibase:sitelinks 0; wikibase:identifiers 0; wikibase:statements ?statements .
MINUS { [] ?backlink ?item }
OPTIONAL { ?item ?p [ prov:wasDerivedFrom [ ?pr [] ] ] . FILTER(?pr NOT IN (pr:P143, pr:P3452)) }
FILTER(!BOUND(?p)) .
MINUS { ?item wdt:P973|wdt:P1343 [] }
SERVICE wikibase:label { bd:serviceParam wikibase:language 'en' }
}
Incorrect use of bounds
editCan be done with all quantity properties, not just mass (P2067).
SELECT ?item ?itemLabel ?length ?upperBound ?lowerBound {
?item p:P106/ps:P106/wdt:P279* wd:Q26270618 .
?item p:P2067 [ psv:P2067 ?value ] . # items that use P2067 (mass)
?value wikibase:quantityAmount ?length .
OPTIONAL {
?value wikibase:quantityUpperBound ?upperBound; wikibase:quantityLowerBound ?lowerBound .
}
SERVICE wikibase:label { bd:serviceParam wikibase:language 'en' }
}
More general:
SELECT ?item ?claimprop ?value ?lowerBound ?upperBound {
?item p:P106/ps:P106/wdt:P279* wd:Q26270618 .
?prop wikibase:propertyType wikibase:Quantity; wikibase:claim ?claimprop; wikibase:statementValue ?stmtval .
?item ?claimprop [ ?stmtval [ wikibase:quantityAmount ?value; wikibase:quantityLowerBound ?lowerBound; wikibase:quantityUpperBound ?upperBound ] ] .
}
Languages and writing scripts by country of citizenship
editSELECT ?country ?countryLabel (GROUP_CONCAT(DISTINCT ?lang; separator=', ') AS ?langs) (GROUP_CONCAT(DISTINCT ?scriptL; separator=', ') AS ?scripts) (COUNT(DISTINCT ?item) AS ?cnt) WITH {
SELECT DISTINCT ?item WHERE {
?item p:P106/ps:P106/wdt:P279* wd:Q26270618
}
} AS %s WHERE {
INCLUDE %s .
?item wdt:P27 ?country .
OPTIONAL {
?country wdt:P37 ?language .
?language rdfs:label ?lang .
FILTER(LANG(?lang) = 'en') .
OPTIONAL {
?language wdt:P282 ?script .
?script rdfs:label ?scriptL .
FILTER(LANG(?scriptL) = 'en') .
}
}
SERVICE wikibase:label { bd:serviceParam wikibase:language 'en' }
} GROUP BY ?country ?countryLabel ORDER BY DESC(?cnt)
Ratio of sourced claims (by source and property)
editSELECT ?refProp ?refPropLabel ?claimProp ?claimPropLabel ?cnt_all ?cnt_sourced ?sourced_ratio WITH {
SELECT ?refProp ?claimProp ?wdt_ref ?pr_ref ?p_claim WHERE { VALUES (?refProp ?claimProp) {
(wd:P2091 wd:P21) (wd:P2091 wd:P27) (wd:P2091 wd:P1532) (wd:P2091 wd:P2048) (wd:P2091 wd:P2067) (wd:P2091 wd:P569) (wd:P2091 wd:P106) (wd:P2091 wd:P641) (wd:P2091 wd:P551) (wd:P2091 wd:P1416) (wd:P2091 wd:P54) (wd:P2091 wd:P463) (wd:P2091 wd:P1344) (wd:P2091 wd:P1559) (wd:P2091 wd:P1477) (wd:P2091 wd:P735) (wd:P2091 wd:P734)
#(wd:P1447 wd:P21) (wd:P1447 wd:P27) (wd:P1447 wd:P1532) (wd:P1447 wd:P2048) (wd:P1447 wd:P2067) (wd:P1447 wd:P569) (wd:P1447 wd:P19) (wd:P1447 wd:P570) (wd:P1447 wd:P20) (wd:P1447 wd:P106) (wd:P1447 wd:P641) (wd:P1447 wd:P1416) (wd:P1447 wd:P54) (wd:P1447 wd:P463) (wd:P1447 wd:P1344) (wd:P1447 wd:P1559) (wd:P1447 wd:P1477) (wd:P1447 wd:P735) (wd:P1447 wd:P734) (wd:P1447 wd:P25) (wd:P1447 wd:P22) (wd:P1447 wd:P3373) (wd:P1447 wd:P40) (wd:P1447 wd:P26) (wd:P1447 wd:P1038) (wd:P1447 wd:P451)
} ?refProp wikibase:directClaim ?wdt_ref; wikibase:reference ?pr_ref . ?claimProp wikibase:claim ?p_claim }
} AS %subquery1 WITH {
SELECT DISTINCT ?item ?s ?wdt_ref ?p_claim WHERE { INCLUDE %subquery1 . ?item p:P106/ps:P106/wdt:P279* wd:Q26270618; ?wdt_ref []; ?p_claim ?s }
} AS %subquery2 WITH {
SELECT ?refProp ?claimProp ?wdt_ref ?pr_ref ?p_claim (COUNT(DISTINCT ?s) AS ?cnt_all) WHERE { INCLUDE %subquery2 } GROUP BY ?refProp ?claimProp ?wdt_ref ?pr_ref ?p_claim
} AS %subquery3 WITH {
SELECT ?refProp ?claimProp ?wdt_ref ?pr_ref ?p_claim (COUNT(DISTINCT ?s) AS ?cnt_sourced) WHERE { INCLUDE %subquery1 . INCLUDE %subquery2 . ?s prov:wasDerivedFrom [ ?pr_ref [] ] } GROUP BY ?refProp ?claimProp ?wdt_ref ?pr_ref ?p_claim
} AS %subquery4 WHERE {
INCLUDE %subquery1 . INCLUDE %subquery3 . INCLUDE %subquery4 . BIND(CONCAT(STR(ROUND(?cnt_sourced / ?cnt_all * 1000)/10), '%') AS ?sourced_ratio) .
SERVICE wikibase:label { bd:serviceParam wikibase:language 'en' }
} ORDER BY ASC(xsd:integer(STRAFTER(STR(?claimProp), 'entity/P')))
Number of P143 sources (by property)
editSELECT ?property ?propertyLabel ?cnt_s ?cnt_refs ?ratio WITH {
SELECT DISTINCT ?property ?s WHERE {
[] p:P106/ps:P106/wdt:P279* wd:Q26270618; ?p ?s .
?property wikibase:claim ?p; wikibase:propertyType ?type .
FILTER(?type != wikibase:ExternalId) .
}
} AS %subquery1 WITH {
SELECT ?property (COUNT(DISTINCT ?s) AS ?cnt_s) (COUNT(DISTINCT ?dummy) as ?cnt_refs) WHERE {
INCLUDE %subquery1 .
OPTIONAL {
?s prov:wasDerivedFrom ?refHandle .
?refHandle pr:P143 ?val . # P143, P887, P4656, P3452, P5852
}
BIND(CONCAT(STR(?s), STR(?refHandle)) AS ?dummy) .
} GROUP BY ?property HAVING(?cnt_refs > 0)
} AS %subquery2 WHERE {
INCLUDE %subquery2 .
BIND(CONCAT(STR(ROUND((?cnt_refs / ?cnt_s)*1000)/10), '%') AS ?ratio) .
SERVICE wikibase:label { bd:serviceParam wikibase:language 'en' }
} ORDER BY DESC(?cnt_refs) DESC(xsd:integer(STRBEFORE(?ratio, '%')))
Related to general person data
editMissing place of death
editDeceased, but no place of death given; already in good form, check regularly.
SELECT ?item ?itemLabel ?itemDescription ?dod {
?item p:P106/ps:P106/wdt:P279* wd:Q26270618 .
?item wdt:P570 ?dod .
MINUS { ?item wdt:P20 ?pod . }
SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
}
Places of birth via plwiki
editPolish Wikipedia (Q1551807) has a significant amount of articles about rowers which do not appear in any other Wikipedia edition. They confuse the residence (P551) field in the World Rowing athlete database (Q21008628) with the place of birth (P19) of that person. Thus there is likely some incorrect data in Wikidata via that path. The place of birth (P19) claims of affected items will be marked with a imported from Wikimedia project (P143) Polish Wikipedia (Q1551807) reference.
SELECT ?item ?placeOfBirth ?sitelink {
?item p:P106/ps:P106/wdt:P279* wd:Q26270618 .
?item p:P19 [ ps:P19 ?placeOfBirth ] .
FILTER(ISBLANK(?placeOfBirth) = false) .
?sitelink schema:about ?item; schema:isPartOf <https://pl.wikipedia.org/> .
?item wikibase:sitelinks 1 .
}
Check citizenship
editSELECT ?item (COUNT(?item) AS ?cocs) {
?item p:P106/ps:P106/wdt:P279* wd:Q26270618 .
?item wdt:P27 ?coc .
FILTER NOT EXISTS {
?item wdt:P570 ?dod .
}
?coc wdt:P31/wdt:P279* wd:Q15893266 .
} GROUP BY ?item ORDER BY DESC(?cocs)
Check citizenship (contemporaneity)
editSELECT ?rower ?rowerLabel ?dob ?dod ?state ?stateLabel ?inception ?dissolved WHERE {
?rower p:P106/ps:P106/wdt:P279* wd:Q26270618; wdt:P27 ?state .
?state wdt:P571 ?inception .
OPTIONAL { ?state wdt:P576 ?dissolved }
?rower p:P569/psv:P569 [ wikibase:timeValue ?dob; wikibase:timePrecision ?dobPrecision ] . FILTER(?dobPrecision >= 9) .
OPTIONAL { ?rower p:P570/psv:P570 [ wikibase:timeValue ?dod; wikibase:timePrecision ?dodPrecision ] . FILTER(?dodPrecision >= 9) }
FILTER(?dissolved < ?dob|| ?inception > ?dod) . # completely out of bounds
# FILTER(?dissolved < ?dod || ?inception > ?dob) . # partially out of bounds; yields a lot of results, and does not indicate what to do
SERVICE wikibase:label { bd:serviceParam wikibase:language '[AUTO_LANGUAGE],en' }
}
(Potential) rowing twins
editSELECT DISTINCT ?item1 ?item1Label ?item2 ?item2Label ?dob ?coc ?gender ?sibling1 ?sibling2 WITH {
SELECT DISTINCT ?item1 ?dob ?coc ?gender WHERE {
?item1 p:P106/ps:P106/wdt:P279* wd:Q26270618; p:P569 [ psv:P569 [ wikibase:timeValue ?dob; wikibase:timePrecision 11 ] ]; wdt:P27 ?coc; wdt:P21 ?gender .
}
} AS %subquery WHERE {
INCLUDE %subquery .
?item2 p:P106/ps:P106/wdt:P279* wd:Q26270618; p:P569 [ psv:P569 [ wikibase:timeValue ?dob; wikibase:timePrecision 11 ] ]; wdt:P27 ?coc; wdt:P21 ?gender .
FILTER(xsd:integer(STRAFTER(STR(?item1), 'Q')) < xsd:integer(STRAFTER(STR(?item2), 'Q'))) .
OPTIONAL {
?item1 p:P3373 ?sibling2s .
?sibling2s ps:P3373 ?sibling2 .
FILTER(?sibling2 = ?item2) .
}
OPTIONAL {
?item2 p:P3373 ?sibling1s .
?sibling1s ps:P3373 ?sibling1 .
FILTER(?sibling1 = ?item1) .
}
SERVICE wikibase:label { bd:serviceParam wikibase:language 'en' }
}
Related to names
editP1559 missing (works also with P735, P569, P570, P19, P20, P21, P27, P31)
editSELECT ?item WHERE {
?item p:P106/ps:P106/wdt:P279* wd:Q26270618
MINUS { ?item wdt:P1559 ?dummy }
}
SELECT ?item ?itemLabel {
?item p:P106/ps:P106/wdt:P279* wd:Q26270618 .
FILTER NOT EXISTS {
?item wdt:P1559 ?name .
}
?item wdt:P27 wd:Q183 .
?sitelink schema:about ?item; schema:isPartOf <https://de.wikipedia.org/> .
SERVICE wikibase:label { bd:serviceParam wikibase:language 'de,en' } .
}
Series ordinals for multiple given names
editSELECT DISTINCT ?item ?qid WHERE {
{
SELECT ?item (COUNT(?givenname) AS ?cnt) WHERE {
?item wdt:P106 wd:Q13382576 .
?item wdt:P735 ?givenname .
} GROUP BY ?item
}
FILTER(?cnt > 1) .
MINUS { ?item p:P735/pq:P1545 [] }
BIND(xsd:integer(SUBSTR(STR(?item), 33)) AS ?qid) .
} ORDER BY DESC(?qid)
Use of compound given name items
editSELECT DISTINCT ?item ?label ?givennameLabel WHERE {
?item p:P106/ps:P106/wdt:P279* wd:Q26270618; wdt:P735 ?givenname .
?givenname wdt:P31 wd:Q1243157; rdfs:label ?givennameLabel .
FILTER(LANG(?givennameLabel) = 'en') .
?item rdfs:label ?label .
FILTER(LANG(?label) = 'en') .
FILTER(CONTAINS(STR(?label), '-') = false) .
FILTER(CONTAINS(STR(?givennameLabel), '-') = false) .
}
Hungarian names
editSELECT DISTINCT ?item ?enLabel ?huLabel ?nativeLabel ?nativeLabelLang WHERE {
?item p:P106/ps:P106/wdt:P279* wd:Q26270618; wdt:P27 wd:Q28 .
?item rdfs:label ?enLabel .
FILTER(LANG(?enLabel) = 'en') .
?item rdfs:label ?huLabel .
FILTER(LANG(?huLabel) = 'hu') .
OPTIONAL {
?item wdt:P1559 ?nativeLabel .
BIND(LANG(?nativeLabel) AS ?nativeLabelLang) .
}
FILTER(STR(?enLabel) = STR(?huLabel)) .
}
Related to event participation
editEvent participation P710/P1344 symmetry
editSELECT ?item ?itemLabel ?event ?eventLabel WHERE {
?item p:P106/ps:P106/wdt:P279* wd:Q26270618 .
?item wdt:P1344 ?event .
?event wdt:P710 ?item .
SERVICE wikibase:label { bd:serviceParam wikibase:language "en" . }
}
Olympic rowing events
editGeneral overview:
SELECT ?regatta ?year ?item ?itemLabel ?class ?participants ?distance {
?item wdt:P31 wd:Q18536594; wdt:P3157 ?distance; wdt:P361 ?regatta; wdt:P1132 ?participants .
?regatta wdt:P31 wd:Q720609; wdt:P580 ?time .
BIND(YEAR(?time) AS ?year) .
OPTIONAL {
?item wdt:P2094 ?class .
}
?item rdfs:label ?itemLabel .
FILTER(LANG(?itemLabel) = 'de') .
} ORDER BY ASC(?year)
Number of participants (needs work):
SELECT ?regatta ?year ?number ?sum ?diff {
{
SELECT ?regatta (SUM(?number) AS ?sum) {
?item wdt:P31 wd:Q18536594; wdt:P361 ?regatta; wdt:P1132 ?number .
?regatta wdt:P31 wd:Q720609 .
} GROUP BY ?regatta
}
?regatta wdt:P1132 ?number; wdt:P580 ?date .
BIND(YEAR(?date) AS ?year) .
BIND(?number - ?sum AS ?diff) .
} ORDER BY ASC(?year)
Related to identifiers
editP1447 might be missing
editSELECT ?item ?oorg ?sr {
?item wdt:P3171 ?oorg .
FILTER NOT EXISTS {
?item wdt:P1447 ?sr .
}
}
Check unknown values against external databases
editSELECT ?item ?identifier ?id {
?item p:P106/ps:P106/wdt:P279* wd:Q26270618; wdt:P19 ?var .
FILTER ISBLANK(?var) .
?identifier wikibase:propertyType wikibase:ExternalId; wikibase:directClaim ?directClaim .
?item ?directClaim ?id .
}
External identifiers of rowing persons
editSELECT ?identifier ?identifierLabel (COUNT(*) AS ?cnt) WITH {
SELECT DISTINCT ?item WHERE {
?item p:P106/ps:P106/wdt:P279* wd:Q26270618 .
}
} AS %subquery WHERE {
INCLUDE %subquery .
?identifier wikibase:propertyType wikibase:ExternalId; wikibase:directClaim ?directClaim .
?item ?directClaim ?identifierValue .
FILTER(?identifier != wd:P2091) . # FISA rower ID
FILTER(?identifier NOT IN (wd:P1447, wd:P3171, wd:P3520, wd:P5815, wd:P4391)) . # Sports-Reference.com ID, IOC ID, DatabaseOlympics.com, Olympic Channel, TheSports
FILTER(?identifier NOT IN (wd:P2002, wd:P2003, wd:P2013, wd:P2397, wd:P3185, wd:P4015)) . # Twitter, instagram, Facebook, youtube channel, vKontakte, vimeo
FILTER(?identifier NOT IN (wd:P3682, wd:P4060, wd:P4054, wd:P4053, wd:P2593, wd:P4056, wd:P2323, wd:P4062, wd:P4068, wd:P4069, wd:P4490, wd:P4067, wd:P4050, wd:P6071, wd:P4061, wd:P4547)) . # national olympic committees
FILTER(?identifier != wd:P646) . # Freebase
SERVICE wikibase:label { bd:serviceParam wikibase:language 'en' }
} GROUP BY ?identifier ?identifierLabel ORDER BY DESC (?cnt)
SELECT ?item ?itemLabel ?identifier ?identifierValue WHERE {
?item p:P106/ps:P106/wdt:P279* wd:Q26270618 .
?identifier wikibase:propertyType wikibase:ExternalId; wikibase:directClaim ?directClaim .
?item ?directClaim ?identifierValue .
FILTER(?identifier != wd:P2091) . # FISA rower ID
FILTER(?identifier != wd:P1447 && ?identifier != wd:P3171 && ?identifier != wd:P3520) . # Sports-Reference.com ID, IOC ID, DatabaseOlympics.com
FILTER(?identifier != wd:P2002 && ?identifier != wd:P2003 && ?identifier != wd:P2013) . # Twitter, instagram, Facebook
FILTER(?identifier != wd:P3682 && ?identifier != wd:P4060 && ?identifier != wd:P4054 && ?identifier != wd:P4053 && ?identifier != wd:P2593 && ?identifier != wd:P4056 && ?identifier != wd:P2323) . # national olympic committees
FILTER(?identifier != wd:P646) . # Freebase
SERVICE wikibase:label { bd:serviceParam wikibase:language 'en' }
}
SELECT ?identifier ?identifierLabel (COUNT(DISTINCT ?s) AS ?statements) (COUNT(DISTINCT ?item) AS ?items) WITH {
SELECT DISTINCT ?item WHERE {
?item p:P106/ps:P106/wdt:P279* wd:Q26270618 .
}
} AS %subquery WHERE {
INCLUDE %subquery .
?item ?p ?s .
?identifier wikibase:claim ?p; wikibase:propertyType wikibase:ExternalId .
SERVICE wikibase:label { bd:serviceParam wikibase:language 'en' }
} GROUP BY ?identifier ?identifierLabel ORDER BY DESC(?statements) DESC(?items)
Non-unique identifiers
editSELECT ?item ?identifier ?value ?item2 WITH {
SELECT DISTINCT ?item WHERE {
?item p:P106/ps:P106/wdt:P279* wd:Q26270618 .
}
} AS %subquery WHERE {
INCLUDE %subquery
?identifier wikibase:propertyType wikibase:ExternalId; wikibase:claim ?identifierClaim; wikibase:statementProperty ?identifierStatementProperty; wikibase:reference ?ref .
?item ?identifierClaim [ ?identifierStatementProperty ?value ] .
?item2 ?identifierClaim [ ?identifierStatementProperty ?value ] .
FILTER(?item != ?item2) .
}
Non-single identifiers
editSELECT ?item ?identifier (COUNT(?value) AS ?cnt) (GROUP_CONCAT(?value; separator=', ') AS ?values) WITH {
SELECT DISTINCT ?item WHERE {
?item p:P106/ps:P106/wdt:P279* wd:Q26270618 .
}
} AS %subquery WHERE {
INCLUDE %subquery
?identifier wikibase:propertyType wikibase:ExternalId; wikibase:claim ?identifierClaim; wikibase:statementProperty ?identifierStatementProperty; wikibase:reference ?ref .
?item ?identifierClaim [ ?identifierStatementProperty ?value ] .
} GROUP BY ?item ?identifier HAVING(?cnt > 1) ORDER BY DESC(?cnt)
Related to terms (labels, descriptions, and aliases)
editMissing French labels/descriptions of rowers (works also with German/English/…)
editSELECT ?item ?itemLabel ?itemDescription ?citizenship WHERE {
{
SELECT ?item ?citizenship WHERE {
?item p:P106/ps:P106/wdt:P279* wd:Q26270618 .
?item wdt:P27 ?citizenship .
}
}
OPTIONAL {
?item rdfs:label ?labels .
FILTER( LANG(?labels) = "fr" ) .
}
FILTER(!BOUND(?labels))
SERVICE wikibase:label { bd:serviceParam wikibase:language "fr" }
}
SELECT ?item ?itemLabel ?itemDescription ?citizenship ?citizenshipLabel WHERE {
{
SELECT ?item ?citizenship WHERE {
?item p:P106/ps:P106/wdt:P279* wd:Q26270618 .
?item wdt:P27 ?citizenship .
}
}
OPTIONAL {
?item schema:description ?descriptions .
FILTER( LANG(?descriptions) = "fr" ) .
}
FILTER(!BOUND(?descriptions))
SERVICE wikibase:label { bd:serviceParam wikibase:language "fr" }
}
Search for descriptions in foreign languages
editSELECT * WITH {
SELECT ?country ?gender ?descriptionLanguage WHERE {
BIND(wd:Q38 AS ?country) .
BIND(wd:Q6581072 AS ?gender) .
BIND('it' AS ?descriptionLanguage) .
}
} AS %input WITH {
SELECT (COUNT(DISTINCT ?item) AS ?items) WHERE {
INCLUDE %input .
?item p:P106/ps:P106/wdt:P279* wd:Q26270618; wdt:P27 ?country; wdt:P21 ?gender .
}
} AS %items WITH {
SELECT (COUNT(DISTINCT ?item) AS ?itemsWithAnyDescription) WHERE {
INCLUDE %input .
?item p:P106/ps:P106/wdt:P279* wd:Q26270618; wdt:P27 ?country; wdt:P21 ?gender; schema:description ?description .
FILTER(LANG(?description) = ?descriptionLanguage) .
}
} AS %itemsWithAnyDescription WITH {
SELECT ?description (COUNT(DISTINCT ?item) AS ?itemsWithThisDescription) WHERE {
INCLUDE %input .
?item p:P106/ps:P106/wdt:P279* wd:Q26270618; wdt:P27 ?country; wdt:P21 ?gender; schema:description ?description .
FILTER(LANG(?description) = ?descriptionLanguage) .
} GROUP BY ?description ORDER BY DESC(?cnt)
} AS %itemsWithThisDescription WHERE {
INCLUDE %itemsWithThisDescription .
INCLUDE %itemsWithAnyDescription .
INCLUDE %items .
INCLUDE %input .
} ORDER BY DESC(?itemsWithThisDescription)
Particular literals in terms
editSELECT DISTINCT ?item ?term ?literal ?lang WHERE {
VALUES ?term { rdfs:label schema:description skos:altLabel }
?item p:P106/ps:P106/wdt:P279* wd:Q26270618; ?term ?literal .
FILTER(CONTAINS(?literal, ' ')) .
BIND(LANG(?literal) AS ?lang) .
}
Use of aliases
editSELECT ?item ?term WHERE {
?item p:P106/ps:P106/wdt:P279* wd:Q26270618
OPTIONAL {
?item skos:altLabel ?term
FILTER(lang(?term) = "de")
}
FILTER(BOUND(?term))
}
Descriptions of rowing persons
editSELECT ?desc ?genderLbl ?cocLbl (COUNT(?desc) AS ?cnt) {
?item p:P106/ps:P106/wdt:P279* wd:Q26270618 .
OPTIONAL {
?item wdt:P21 ?gender .
?gender rdfs:label ?genderLbl .
FILTER(LANG(?genderLbl) = 'de') .
}
OPTIONAL {
?item wdt:P27 ?coc .
?coc rdfs:label ?cocLbl .
FILTER(LANG(?cocLbl) = 'de') .
}
?item schema:description ?desc .
FILTER(LANG(?desc) = 'de') .
} GROUP BY ?desc ?genderLbl ?cocLbl ORDER BY DESC(?cnt)
Descriptions of rowing persons with non-rowing occupations
editSELECT ?item ?itemLabel ?itemDescription ?occupation ?occupationLabel WHERE {
?item p:P106/ps:P106/wdt:P279* wd:Q26270618 .
?item wdt:P106 ?occupation .
MINUS { ?occupation wdt:P279* wd:Q26270618 }
SERVICE wikibase:label { bd:serviceParam wikibase:language 'en' }
}
Missing descriptions of rowing persons by language
editSELECT ?str (COUNT(*) AS ?cnt) WITH {
SELECT DISTINCT ?item WHERE {
?item p:P106/ps:P106/wdt:P279* wd:Q26270618 .
?item wdt:P21 wd:Q6581072; wdt:P27 wd:Q183 .
}
} AS %subquery WHERE {
INCLUDE %subquery .
?item schema:description ?str . FILTER(LANG(?str) = 'es') .
} GROUP BY ?str ORDER BY DESC(?cnt)
SELECT DISTINCT ?item WITH {
SELECT ?item (COUNT(*) AS ?cnt) WHERE {
?item p:P106/ps:P106/wdt:P279* wd:Q13382576; wdt:P106 ?occ .
?item wdt:P21 wd:Q6581097; wdt:P27 wd:Q183 .
} GROUP BY ?item HAVING ( ?cnt = 1 )
} AS %subquery WHERE {
INCLUDE %subquery .
OPTIONAL { ?item schema:description ?str . FILTER(LANG(?str) = 'es') }
FILTER(!BOUND(?str)) .
}
English description and English Wikipedia short description
edit- petscan:17020429 (different descriptions)
- petscan:17023647 (case-insensitively identical descriptions)
- petscen:17023652 (description missing in Wikidata)
Watchlist management
editAll rowing persons (for watchlist import)
editSELECT DISTINCT ?stritem WHERE {
?item p:P106/ps:P106/wdt:P279* wd:Q26270618 .
BIND(STRAFTER(STR(?item), 'entity/') AS ?stritem) .
} ORDER BY ASC(xsd:integer(STRAFTER(?stritem, 'Q')))
Search for non-rowing stuff on watchlist
editSELECT DISTINCT ?item ?itemLabel WHERE {
VALUES ?item {
# put items here
}
MINUS { ?item wdt:P106?/wdt:P279* wd:Q26270618 } # rowing people
MINUS { ?item wdt:P31?/wdt:P279* wd:Q21246076 } # events
MINUS { ?item wdt:P31?/wdt:P279* wd:Q21224061 } # regattas
MINUS { ?item wdt:P3450/wdt:P279* wd:Q21224061 } # seasons
MINUS { ?item wdt:P31?/wdt:P279* wd:Q43445087 } # organizations
MINUS { ?item wdt:P31|wdt:P366 wd:Q2137251 } # venues
MINUS { ?item wdt:P31 wd:Q22936940; wdt:P641/wdt:P279* wd:Q159354 } # competition classes
MINUS { ?item wdt:P31 wd:Q26211803 } # boat classes
MINUS { ?item wdt:P279*|wdt:P361 wd:Q606305 } # equipment
MINUS { ?item wdt:P641?/wdt:P279* wd:Q159354 } # just sport
MINUS { ?item wdt:P31/wdt:P279* wd:Q4167836 } # categories
MINUS { ?item wdt:P31/wdt:P279* wd:Q11266439 } # templates
MINUS { ?item wdt:P31 wd:Q13406463 } # lists
MINUS { ?item wdt:P31 wd:Q4167410 } # dab
SERVICE wikibase:label { bd:serviceParam wikibase:language 'en' }
}