Newer
Older
DataReport / family-scope / dataset-structure-geo.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 .
    
  FILTER (?dimension_uri in (<http://gss-data.org.uk/def/dimension/trade-partner-geography>, <http://gss-data.org.uk/def/dimension/citizenship>, <http://gss-data.org.uk/def/dimension/residence>, <http://gss-data.org.uk/def/dimension/country-of-ownership>, <http://gss-data.org.uk/def/dimension/trade-reporter-geography>, <http://gss-data.org.uk/def/dimension/foreign-geography>, <http://gss-data.org.uk/def/dimension/nationality>, <http://gss-data.org.uk/def/dimension/ons-fdi-area>))
}
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