query: #title: Leading two check digits in an ABN must be correct
  # Complex constraint from [[Property talk:P3548]]
  # [https://abr.business.gov.au/Help/AbnFormat Algorithm for checking whether the leading two check digits are correct]
  SELECT ?item WHERE { ?item wdt:P3548 ?ABN. BIND(xsd:integer(SUBSTR(?ABN, 1, 1)) - 1 AS ?digit1). BIND(xsd:integer(SUBSTR(?ABN, 2, 1)) AS ?digit2). BIND(xsd:integer(SUBSTR(?ABN, 3, 1)) AS ?digit3). BIND(xsd:integer(SUBSTR(?ABN, 4, 1)) AS ?digit4). BIND(xsd:integer(SUBSTR(?ABN, 5, 1)) AS ?digit5). BIND(xsd:integer(SUBSTR(?ABN, 6, 1)) AS ?digit6). BIND(xsd:integer(SUBSTR(?ABN, 7, 1)) AS ?digit7). BIND(xsd:integer(SUBSTR(?ABN, 8, 1)) AS ?digit8). BIND(xsd:integer(SUBSTR(?ABN, 9, 1)) AS ?digit9). BIND(xsd:integer(SUBSTR(?ABN, 10, 1)) AS ?digit10). BIND(xsd:integer(SUBSTR(?ABN, 11, 1)) AS ?digit11). BIND(xsd:integer(?digit1 * 10 + ?digit2 + ?digit3 * 3 + ?digit4 * 5 + ?digit5 * 7 + ?digit6 * 9 + ?digit7 * 11 + ?digit8 * 13 + ?digit9 * 15 + ?digit10 * 17 + ?digit11 * 19) AS ?weighted). BIND(xsd:double(?weighted) / xsd:double(89) AS ?division89). FILTER(FLOOR(?division89) != CEIL(?division89)) } LIMIT 1000