query: #title: Check letter (key)
  # Complex constraint from [[Property talk:P3202]]
  # See [https://blog.juliendelmas.fr/?qu-est-ce-que-le-code-rne-ou-uai this example of check]
  SELECT ?item ?str ?mod23xi WHERE {
    ?item wdt:P3202 ?str.
    BIND(str(?str) AS ?uai)
    BIND(STRLEN(?uai) AS ?strlen) 
    BIND(substr(?str,?strlen-0,1) AS ?key)
    BIND(xsd:integer(substr(?str,?strlen-1,1)) AS ?x1)
    BIND(xsd:integer(substr(?str,?strlen-2,1)) AS ?x2)
    BIND(xsd:integer(substr(?str,?strlen-3,1)) AS ?x3)
    BIND(xsd:integer(substr(?str,?strlen-4,1)) AS ?x4)
    BIND(xsd:integer(substr(?str,?strlen-5,1)) AS ?x5)
    BIND(xsd:integer(substr(?str,?strlen-6,1)) AS ?x6)
    BIND(xsd:integer(substr(?str,?strlen-7,1)) AS ?x7)
    BIND(CONCAT(str(?x7), str(?x6), str(?x5), str(?x4), str(?x3), str(?x2), str(?x1)) AS ?concat)
    BIND(xsd:integer(?concat) AS ?xi)
    BIND(?xi-(xsd:integer(?xi/23)*23) AS ?mod23xi)
    BIND(REGEX (?uai, '^[1-9]{7}[A-Z]$') AS ?correct_pattern)
    FILTER(! ?correct_pattern)
    FILTER(! (?key = 'A' && ?mod23xi = 0))
    FILTER(! (?key = 'B' && ?mod23xi = 1))
    FILTER(! (?key = 'C' && ?mod23xi = 2))
    FILTER(! (?key = 'D' && ?mod23xi = 3))
    FILTER(! (?key = 'E' && ?mod23xi = 4))
    FILTER(! (?key = 'F' && ?mod23xi = 5))
    FILTER(! (?key = 'G' && ?mod23xi = 6))
    FILTER(! (?key = 'H' && ?mod23xi = 7))
    FILTER(! (?key = 'J' && ?mod23xi = 8))
    FILTER(! (?key = 'K' && ?mod23xi = 9))
    FILTER(! (?key = 'L' && ?mod23xi = 10))
    FILTER(! (?key = 'M' && ?mod23xi = 11))
    FILTER(! (?key = 'N' && ?mod23xi = 12))
    FILTER(! (?key = 'P' && ?mod23xi = 13))
    FILTER(! (?key = 'R' && ?mod23xi = 14))
    FILTER(! (?key = 'S' && ?mod23xi = 15))
    FILTER(! (?key = 'T' && ?mod23xi = 16))
    FILTER(! (?key = 'U' && ?mod23xi = 17))
    FILTER(! (?key = 'V' && ?mod23xi = 18))
    FILTER(! (?key = 'W' && ?mod23xi = 19))
    FILTER(! (?key = 'X' && ?mod23xi = 20))
    FILTER(! (?key = 'Y' && ?mod23xi = 21))
    FILTER(! (?key = 'Z' && ?mod23xi = 22))
  } ORDER BY ?item