Newer
Older
DataReport / family-scope / dataset-structure.sparql
PREFIX qb: <http://purl.org/linked-data/cube#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX pmdqb: <http://publishmydata.com/def/qb/>

SELECT ?dataset ?dataset_uri ?component_spec_uri ?dimension_uri ?dimension ?codelist ?codelist_uri
WHERE {
  ?dataset_uri
    a qb:DataSet;
    rdfs:label ?dataset;
    qb:structure/qb:component ?component_spec_uri .

  ?component_spec_uri
    qb:dimension ?dimension_uri .
    
  ?dimension_uri rdfs:label ?dimension .
  
  ?component_spec_uri pmdqb:codesUsed/skos:member/skos:inScheme ?codelist_uri .
  
  ?codelist_uri rdfs:label ?codelist .
}
GROUP BY ?dataset ?dataset_uri ?component_spec_uri ?dimension ?dimension_uri ?codelist ?codelist_uri
ORDER BY ?dataset_uri ?component_spec_uri ?dimension_uri ?codelist_uri