Topic on User talk:TweetsFactsAndQueries

Jump to navigation Jump to search

SPARQL - ISNI unique value constraint violations

2
Summary by TweetsFactsAndQueries

query requested, written, now used on Property talk:P213

2.243.118.239 (talkcontribs)

ISNI (P213) went up from ~550 000 (2018-06-12) to ~970 000 (2018-06-18). The unique value constraint violations went up from ~340 to 3300. They can help to find duplicates, several have been found. Is it possible to write a SPARQL for Wikidata:Database_reports/Constraint_violations/P213#"Unique_value"_violations Columns: 1 the ISNI 2 item1 3 item1Label 4 item1P569 5 item2 6 item2Label 7 item2P569 It would already help to do it for two items that have the same ISNI or to only show two.

TweetsFactsAndQueries (talkcontribs)
SELECT ?isni ?item1 ?item1Label ?item1DateOfBirth ?item2 ?item2Label ?item2DateOfBirth WITH {
  SELECT * WHERE {
    ?item1 wdt:P213 ?isni;
           wdt:P569 ?item1DateOfBirth.
    ?item2 wdt:P213 ?isni;
           wdt:P569 ?item2DateOfBirth.
    FILTER(STR(?item1) < STR(?item2))
  }
  LIMIT 1000
} AS %results WHERE {
  INCLUDE %results.
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}

Try it!