Wikidata:WikiProject Visual arts/Getty Vocabularies/reference normalization

  • Count other properties used in references with a certain condition (here stated in (P248)Union List of Artist Names (Q2494649)):
    SELECT ?prop ?propLabel ?count WHERE {
      {
        SELECT ?refProp (COUNT(?refProp) AS ?count) WHERE {
          ?statement prov:wasDerivedFrom ?wdRef.
          ?wdRef pr:P248 wd:Q2494649. # stated in ULAN
          ?wdRef ?refProp [].
        }
        GROUP BY ?refProp
      }
      ?prop wikibase:reference ?refProp.
      SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
    }
    ORDER BY DESC(?count)
    
    Try it!
  • Union List of Artist Names ID (P245), but no stated in (P248)Union List of Artist Names (Q2494649):
    SELECT ?prop ?propLabel ?count WHERE {
      {
        SELECT ?refProp (COUNT(?refProp) AS ?count) WHERE {
          ?statement prov:wasDerivedFrom ?wdRef.
          ?wdRef pr:P245 [].
          MINUS { ?wdRef pr:P248 wd:Q2494649. }
          ?wdRef ?refProp [].
        }
        GROUP BY ?refProp
      }
      ?prop wikibase:reference ?refProp.
      SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
    }
    ORDER BY DESC(?count)
    
    Try it!
  • References with Union List of Artist Names ID (P245) without stated in (P248):
    SELECT ?entity ?entityLabel ?prop ?ref ?link WHERE {
      ?entity ?prop ?statement.
      ?statement prov:wasDerivedFrom ?ref.
      ?ref pr:P245 [].
      MINUS { ?ref pr:P248 wd:Q2494649. }
      BIND(URI(CONCAT(STR(?entity), "#", SUBSTR(STR(?prop), 30))) AS ?link)
      SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
    }
    
    Try it!