W3C & ANSI Open Standards Architecture

Conceptual Data Virtualization for SQL and RDF

Why Open Standards Conceptual Data Virtualization fundamentally outperforms contemporary YAML-based Semantic Layers — unlocking real-time graph reasoning, dual SQL/SPARQL algebra, and global HTTP URI super keys with zero data duplication.

Source: Medium Virtuoso Blog • Published: April 27, 2018 • KG curated by kg-generator, rdf-infographic-skill, the data-twingler verification skill, and GPT-5 Codex on behalf of Kingsley Idehen
0 Bytes
Physical Data Replication Required
100%
W3C Open Standards (R2RML, RDF, SPARQL)
SQL + SPARQL
Simultaneous SQL & SPARQL Query Algebra
AI-Ready
Direct Knowledge Graph Context for LLMs
Executive Narrative

The Value Proposition: Beyond YAML Semantic Layers🔗

Contrasting static YAML configuration files with dynamic, ontology-backed open standards virtualization.

Contemporary data stacks rely on YAML-based semantic layers to define metrics, but they remain trapped in SQL-only generation, local string identifiers, and static schema files.

Tools like dbt Semantic Layer, Cube, and LookML attempt to bridge business logic by writing proprietary YAML configs. However, they lack formal ontologies, cannot perform recursive graph traversals, cannot execute SPARQL, and provide no automated deductive reasoning (`subClassOf`, `sameAs`).

Conceptual Data Virtualization via OpenLink Virtuoso elevates relational tables into true semantic Knowledge Graphs using W3C standards (R2RML, RDF, SPARQL, OWL). By replacing local column strings with global HTTP URI "super keys," it enables real-time inferencing and AI agent retrieval across disparate enterprise silos without moving data.

  • ✓

    Global HTTP Super Keys vs Local Strings

    Entities are uniquely addressable across organizational boundaries, not scoped to proprietary YAML projects.

  • ✓

    Automated Deductive Reasoning

    Dynamic OWL/RDFS inferences execute at query time without maintaining brittle manual SQL join paths.

  • ✓

    Unified Query Engine

    Run native ANSI SQL for tabular reports and SPARQL 1.1 for graph traversals over the exact same tables.

  • ✓

    Autonomous AI Agent Context

    Equip LLMs with self-describing, machine-readable Knowledge Graph context rather than fragile text-to-SQL prompts.

System Architecture

4-Tier Conceptual Virtualization Architecture🔗

How OpenLink Virtuoso bridges physical relational storage with high-level semantic graphs and universal client interfaces.

Multi-protocol access layer serving enterprise BI dashboards, semantic faceted search (FCT), web apps, and autonomous AI agents.

SQL BI Tools SPARQL 1.1 Endpoint Faceted Browser (FCT) GraphQL / REST AI Agent / LLM Context

Virtual RDF Quad Store presenting virtual graph views, executing W3C SPARQL pattern matching and dynamic OWL/RDFS reasoning.

Virtual RDF Quad Store rdfs:subClassOf rdfs:subPropertyOf owl:sameAs URI Dereferencing

Declarative W3C R2RML rules and Virtuoso Quad Map definitions that dynamically rewrite SPARQL graph queries into optimized SQL joins.

W3C R2RML Engine Virtuoso Quad Maps SQL Cost-Based Optimizer SPASQL Hybrid Engine

Native column-wise or row-wise SQL tables in Virtuoso, or heterogeneous remote databases connected via ODBC/JDBC Virtual Database (VDB).

Virtuoso RDBMS Oracle VDB SQL Server VDB PostgreSQL VDB MySQL / Db2 VDB
Contemporary Architecture Comparison

Architecture Comparison Matrix🔗

Evaluating Open Standards Conceptual Data Virtualization against contemporary YAML-based semantic layers and dedicated graph stores.

Aspect / Dimension YAML-Based Semantic Layers (dbt / Cube / LookML) Dedicated Physical Graph Stores Conceptual Virtualization (Virtuoso)
Specification & Portability Proprietary YAML configuration files; tied to vendor-specific compilation engines. Proprietary property graph schemas or custom DDL. 100% W3C Open Standards: W3C R2RML, W3C RDF, OWL, and ANSI SQL.
Entity Identity & Resolution Local string column/dimension names; no global web addressing or dereferencing. Internal numeric/string node IDs; cluster-local scope. Global HTTP URI 'super keys' dereferenceable across organizational boundaries.
Formal Ontology & Reasoning Zero ontology reasoning; static metric calculations and fixed join paths. Limited to custom graph algorithms; no standard OWL/RDFS inferencing. Full OWL/RDFS inferencing (`subClassOf`, `subPropertyOf`, `sameAs`) in real time.
Query Algebra & Dual-Model SQL code generation only; cannot execute graph pattern matching. Graph query only (Cypher/Gremlin); cannot execute standard SQL. Simultaneous native SQL, SPARQL 1.1 graph queries, and hybrid SPASQL.
Data Movement & Replication Requires building pre-aggregated tables or query federation over warehouse. Full physical duplication into separate standalone database cluster. Zero replication; real-time query rewriting over live transactional tables.
AI Agent & LLM Readiness Limited to Text-to-SQL over pre-defined metrics; hallucination prone. Moderate; graph exploration possible but siloed from transactional RDBMS. High; machine-readable Knowledge Graph context with self-describing ontologies.
Tool & BI Ecosystem Requires vendor-specific BI plugins or semantic layer proxy. Standard SQL/BI reporting tools cannot natively connect. Complete preservation of standard ODBC, JDBC, ADO.NET, and BI dashboards.
Schema Evolution & Federation Schema changes require manually editing YAML files and re-deploying. Schema changes require ETL pipeline updates and graph reload. Dynamic ontology evolution and multi-database VDB federation with zero downtime.
Execution Pipeline

7-Step Implementation Workflow🔗

A practical engineering roadmap for deploying conceptual relational data virtualization in OpenLink Virtuoso.

1

1. Inventory & Connect Relational Data Sources

Identify target relational databases (e.g., Oracle, SQL Server, PostgreSQL, MySQL) and link them into Virtuoso's Virtual Database (VDB) engine using standard ODBC/JDBC drivers.

2

2. Establish Global Entity Identifiers with HTTP URIs

Define URI minting schemes for entities (e.g., customers, products, orders) using HTTP URIs that act as universal 'super keys' across disparate table schemas and silos.

3

3. Author Declarative R2RML & Quad Map Definitions

Generate declarative W3C R2RML mappings or Virtuoso Quad Map declarations that bind relational tables and foreign keys to target ontology classes and predicates.

4

4. Instantiate the Virtual RDF Graph Views

Execute the mapping definitions inside Virtuoso to instantiate named graph views, creating a real-time virtual knowledge graph without physical data duplication.

5

5. Execute Dual-Model Queries (SQL, SPARQL & SPASQL)

Query the virtualized data using native SQL for tabular analytics, SPARQL for semantic relationship discovery, or SPASQL to execute hybrid graph-relational queries in a single statement.

6

6. Apply Ontology Reasoning & Inferences

Bind W3C OWL and RDFS rule sets to the virtual graphs, enabling Virtuoso's built-in inference engine to resolve subClassOf, subPropertyOf, and sameAs relationships dynamically.

7

7. Publish to BI Dashboards, Applications & AI Agents

Expose the virtualized knowledge graph to external BI tools via ODBC/JDBC, web applications via REST/GraphQL, and LLMs/AI agents through structured SPARQL endpoints.

Technical Clarifications

Frequently Asked Questions🔗

Detailed answers to the 12 most critical questions about SQL/RDF virtualization architecture and YAML-based semantic layers.

1. What is conceptual data virtualization in the context of SQL and RDF?
Conceptual data virtualization is an architectural approach that maps structured relational database tables into virtual RDF knowledge graphs in real time. Instead of physically copying data via batch ETL, a multi-model engine like Virtuoso executes query rewrites on the fly, allowing developers to query relational data as a knowledge graph using SPARQL, or query graph data as tables using SQL.
2. How does conceptual virtualization differ from contemporary YAML-based semantic layers?
YAML-based semantic layers (dbt Semantic Layer, Cube, LookML) are configuration-driven templates designed primarily to generate SQL GROUP BY queries for BI metrics. They rely on local string identifiers, lack formal ontology models, cannot perform graph traversals or recursive queries, and offer no automated deductive reasoning. In contrast, conceptual virtualization uses W3C standards (RDF, OWL, SPARQL, R2RML) with global HTTP URI super keys, dynamic ontology inference, and simultaneous dual SQL/SPARQL query execution.
3. Why are YAML-based semantic layers insufficient for autonomous AI Agents and LLMs?
YAML semantic layers only describe metric definitions and table joins in static text files, requiring LLMs to generate brittle SQL queries that are prone to hallucinated joins. Conceptual virtualization provides a live, self-describing Knowledge Graph where entities and relationships are globally identified by HTTP URIs, allowing AI agents to explore context, disambiguate terms, and follow property paths dynamically via SPARQL.
4. What is a 'super key' in the context of Linked Data and HTTP URIs?
In relational databases and YAML semantic layers, keys and dimension names are scoped locally within a single table, project, or warehouse. In Linked Data, HTTP URIs serve as 'super keys'—globally unique, network-resolvable identifiers that uniquely name an entity across disparate databases, enterprise departments, and the global Web.
5. How does W3C R2RML compare to proprietary YAML mapping files?
R2RML is a vendor-neutral W3C standard expressed in RDF itself, ensuring complete portability across any compliant graph engine. YAML mapping files are proprietary to individual tools (e.g., dbt MetricFlow YAML, Cube YAML) and lock organizations into a specific vendor's compilation engine without semantic interoperability.
6. Does conceptual data virtualization require moving or copying data?
No. Conceptual data virtualization is zero-replication. Relational data remains in its native tables (in Virtuoso or external remote databases). Virtuoso executes dynamic query transformation at query time, guaranteeing that graph queries always access the freshest, live transactional state.
7. What is SPASQL and how does it enable hybrid queries?
SPASQL (SPARQL embedded in SQL) is Virtuoso's extension that allows SPARQL queries to be executed directly inside SQL statements (e.g., `SPARQL SELECT ...` or SQL `FROM (SPARQL SELECT ...)`). This enables existing SQL tools, reporting software, and BI dashboards to leverage semantic graph traversal and inference without requiring a dedicated SPARQL client.
8. Can external third-party relational databases be virtualized as RDF graphs?
Yes. Virtuoso's Virtual Database (VDB) layer can link remote databases such as Oracle, Microsoft SQL Server, PostgreSQL, MySQL, DB2, and Informix via ODBC/JDBC. Once linked, these remote tables can be mapped to virtual RDF graphs using R2RML, creating a unified semantic layer across the entire enterprise.
9. How does automated ontology reasoning work over virtualized data?
Virtuoso includes a built-in backward-chaining inference engine. When an ontology (e.g., specifying that `ex:hasManager` is a sub-property of `ex:reportsTo`) is bound to a virtual graph, SPARQL queries automatically infer implicit relationships across relational data rows on the fly without materializing additional triples.
10. How does conceptual virtualization eliminate the relational vs graph impedance mismatch?
The impedance mismatch occurs because relational databases enforce fixed tabular schemas and tuple calculus, while graphs model flexible, interconnected entities with evolving relationships. Virtuoso eliminates this tension by treating tables and graphs as dual mathematical projections of the same underlying data, allowing users to choose the optimal query language (SQL or SPARQL) without altering storage.
11. What are the performance characteristics of Virtuoso's query rewrite engine?
Virtuoso's cost-based SQL/SPARQL optimizer translates SPARQL graph patterns into optimized SQL joins over indexed relational primary/foreign keys. Benchmarks demonstrate that Virtuoso's virtualized SPARQL execution often approaches native SQL performance by pushing joins and filters directly into the storage engine.
12. How does this architecture compare to traditional ETL data warehousing?
Traditional ETL pipelines suffer from data latency, high storage duplication costs, fragile schema maintenance, and rigid downstream models. Conceptual virtualization eliminates ETL pipelines, delivers real-time live data queries, enables schema agility via ontology mappings, and reduces total cost of ownership.
Vocabulary & Standards

Core Technical Glossary🔗

Foundational concepts, query languages, and standards governing conceptual data virtualization.

An approach to data management that allows an application to retrieve and manipulate data without requiring technical details about how it is formatted or physically stored.

ANSI/ISO domain-specific language used in programming and designed for managing data held in relational database management systems.

An RDF query language and W3C standard for querying and manipulating directed labeled graph data stored in RDF format across endpoints.

W3C standard family representing information as subject-predicate-object triples that form directed labeled knowledge graphs.

A database based on the relational model, organizing data into tables of rows and columns linked by primary and foreign keys.

Linked Data

Architecture

Design principles for publishing structured data on the Web using HTTP URIs, standard formats (RDF), and hyperlinks to interconnect data silos.

A structured representation of real-world entities, concepts, and relationships modeled as nodes and edges with formal ontologies.

Standard application programming interfaces for accessing database management systems across diverse operating systems and languages.

HTTP URI Super Key

Identifier

A globally unique, network-resolvable identifier used in Linked Data as a universal primary and foreign key across boundaries.

A formal, explicit specification of a shared conceptualization defining classes, properties, axioms, and inference rules.

Live Query Showcase

SPARQL Direct Execution Examples🔗

Live, verified SPARQL queries targeting Virtuoso's virtualized Named Graph <urn:demo.csv:northwind:data> on demo.openlinksw.com.

Every result keeps a global super key in view.

The highlighted variables bind HTTP entity IRIs. In Virtuoso's HTML result view they become hyperlinks: click one to dereference the entity, inspect its description, or carry the same identity into another application.

SELECT • Diagnostic schema discovery

Entity Classes & Instance Counts

Inventory every virtualized class, with a dereferenceable sample entity IRI for each class.

Endpoint: demo.openlinksw.comurn:demo.csv:northwind:dataEntity IRI: ?sampleEntity
SELECT DISTINCT ?class (SAMPLE(?entity) AS ?sampleEntity) (COUNT(*) AS ?count)
FROM <urn:demo.csv:northwind:data>
WHERE {
  ?entity a ?class .
}
GROUP BY ?class
ORDER BY DESC(?count)
LIMIT 50
SELECT • Entity exploration

Virtualized Customers Exploration

Inspect customer attributes while retaining the customer HTTP IRI as the stable row identity.

Endpoint: demo.openlinksw.comurn:demo.csv:northwind:dataEntity IRI: ?customer
PREFIX csv: <http://demo.openlinksw.com/schemas/csv_northwind/>

SELECT DISTINCT
       (SAMPLE(?customerValue) AS ?customer)
       (SAMPLE(?companyNameValue) AS ?companyName)
       (SAMPLE(?contactNameValue) AS ?contactName)
       (SAMPLE(?cityValue) AS ?city)
       (SAMPLE(?countryValue) AS ?country)
FROM <urn:demo.csv:northwind:data>
WHERE {
  ?customerValue a csv:customers ;
                 csv:customerid ?customerId ;
                 csv:companyname ?companyNameValue ;
                 csv:contactname ?contactNameValue ;
                 csv:city ?cityValue ;
                 csv:country ?countryValue .
}
GROUP BY ?customerId
LIMIT 20
SELECT • Two-table traversal

Products & Suppliers Virtual Graph Traversal

Traverse product-to-supplier relationships and expose both participating entity IRIs.

Endpoint: demo.openlinksw.comurn:demo.csv:northwind:dataEntity IRI: ?product · ?supplier
PREFIX csv: <http://demo.openlinksw.com/schemas/csv_northwind/>

SELECT DISTINCT
       (SAMPLE(?productValue) AS ?product)
       (SAMPLE(?supplierValue) AS ?supplier)
       (SAMPLE(?productNameValue) AS ?productName)
       (SAMPLE(?unitPriceValue) AS ?unitPrice)
       (SAMPLE(?supplierNameValue) AS ?supplierName)
       (SAMPLE(?supplierCountryValue) AS ?supplierCountry)
FROM <urn:demo.csv:northwind:data>
WHERE {
  ?productValue a csv:products ;
                csv:productid ?productId ;
                csv:productname ?productNameValue ;
                csv:unitprice ?unitPriceValue ;
                csv:supplierid ?supplierId .
  ?supplierValue a csv:suppliers ;
                 csv:supplierid ?supplierId ;
                 csv:companyname ?supplierNameValue ;
                 csv:country ?supplierCountryValue .
}
GROUP BY ?productId
ORDER BY DESC(SAMPLE(?unitPriceValue))
LIMIT 20
SELECT • Four-table traversal

Orders, Customers & Order Details

Return one row per order, with representative customer and line-item values selected by SAMPLE() while retaining global entity identity.

Endpoint: demo.openlinksw.comurn:demo.csv:northwind:dataEntity IRI: ?order · ?customer · ?product
PREFIX csv: <http://demo.openlinksw.com/schemas/csv_northwind/>

SELECT DISTINCT
       (SAMPLE(?orderValue) AS ?order)
       (SAMPLE(?customerValue) AS ?customer)
       (SAMPLE(?productValue) AS ?product)
       (SAMPLE(?companyNameValue) AS ?companyName)
       (SAMPLE(?orderDateValue) AS ?orderDate)
       (SAMPLE(?productNameValue) AS ?productName)
       (SAMPLE(?quantityValue) AS ?quantity)
       (SAMPLE(?unitPriceValue) AS ?unitPrice)
FROM <urn:demo.csv:northwind:data>
WHERE {
  ?orderValue a csv:orders ;
              csv:orderid ?orderId ;
              csv:customerid ?customerId ;
              csv:orderdate ?orderDateValue .
  ?customerValue a csv:customers ;
                 csv:customerid ?customerId ;
                 csv:companyname ?companyNameValue .
  ?detail a csv:orders_details ;
          csv:orderid ?orderId ;
          csv:productid ?productId ;
          csv:quantity ?quantityValue ;
          csv:unitprice ?unitPriceValue .
  ?productValue a csv:products ;
                csv:productid ?productId ;
                csv:productname ?productNameValue .
}
GROUP BY ?orderId
ORDER BY DESC(SAMPLE(?orderDateValue))
LIMIT 20
SELECT • Real-time aggregation

Customers by Country

Aggregate by country while retaining one sample customer IRI as a navigable entry point into each group.

Endpoint: demo.openlinksw.comurn:demo.csv:northwind:dataEntity IRI: ?sampleCustomer
PREFIX csv: <http://demo.openlinksw.com/schemas/csv_northwind/>

SELECT DISTINCT ?country (SAMPLE(?customer) AS ?sampleCustomer) (COUNT(DISTINCT ?customer) AS ?customerCount)
FROM <urn:demo.csv:northwind:data>
WHERE {
  ?customer a csv:customers ;
            csv:country ?country .
}
GROUP BY ?country
ORDER BY DESC(?customerCount)
LIMIT 15
CONSTRUCT • CONSTRUCT transformation

Schema.org Linked Data Transformation

Re-express source rows as Schema.org organizations while preserving each customer HTTP IRI.

Endpoint: demo.openlinksw.comurn:demo.csv:northwind:dataEntity IRI: ?customer
PREFIX csv: <http://demo.openlinksw.com/schemas/csv_northwind/>
PREFIX schema: <http://schema.org/>

CONSTRUCT {
  ?customer a schema:Organization ;
            schema:name ?companyName ;
            schema:address [
              a schema:PostalAddress ;
              schema:addressLocality ?city ;
              schema:addressCountry ?country
            ] .
}
FROM <urn:demo.csv:northwind:data>
WHERE {
  ?customer a csv:customers ;
            csv:companyname ?companyName ;
            csv:city ?city ;
            csv:country ?country .
}
LIMIT 10
SELECT • Category traversal

Categories to Products: Portfolio Navigation

Move from a category IRI to its product IRIs and compare prices without a materialized graph copy.

Endpoint: demo.openlinksw.comurn:demo.csv:northwind:dataEntity IRI: ?category · ?product
PREFIX csv: <http://demo.openlinksw.com/schemas/csv_northwind/>

SELECT DISTINCT
       (SAMPLE(?productValue) AS ?product)
       (SAMPLE(?categoryValue) AS ?category)
       (SAMPLE(?categoryNameValue) AS ?categoryName)
       (SAMPLE(?productNameValue) AS ?productName)
       (SAMPLE(?unitPriceValue) AS ?unitPrice)
FROM <urn:demo.csv:northwind:data>
WHERE {
  ?categoryValue a csv:categories ;
                 csv:categoryid ?categoryId ;
                 csv:categoryname ?categoryNameValue .
  ?productValue a csv:products ;
                csv:productid ?productId ;
                csv:categoryid ?categoryId ;
                csv:productname ?productNameValue ;
                csv:unitprice ?unitPriceValue .
}
GROUP BY ?productId
ORDER BY ?categoryName DESC(?unitPrice)
LIMIT 20
SELECT • Responsibility traversal

Employees to Orders: Operational Responsibility

Use employee and order IRIs to connect responsible people with recent fulfillment activity.

Endpoint: demo.openlinksw.comurn:demo.csv:northwind:dataEntity IRI: ?employee · ?order
PREFIX csv: <http://demo.openlinksw.com/schemas/csv_northwind/>

SELECT DISTINCT
       (SAMPLE(?orderValue) AS ?order)
       (SAMPLE(?employeeValue) AS ?employee)
       (SAMPLE(?firstNameValue) AS ?firstName)
       (SAMPLE(?lastNameValue) AS ?lastName)
       (SAMPLE(?orderDateValue) AS ?orderDate)
       (SAMPLE(?shipCountryValue) AS ?shipCountry)
FROM <urn:demo.csv:northwind:data>
WHERE {
  ?employeeValue a csv:employees ;
                 csv:employeeid ?employeeId ;
                 csv:firstname ?firstNameValue ;
                 csv:lastname ?lastNameValue .
  ?orderValue a csv:orders ;
              csv:orderid ?orderId ;
              csv:employeeid ?employeeId ;
              csv:orderdate ?orderDateValue ;
              csv:shipcountry ?shipCountryValue .
}
GROUP BY ?orderId
ORDER BY DESC(SAMPLE(?orderDateValue))
LIMIT 20
SELECT • Logistics traversal

Shippers to Orders: Delivery Network

Navigate from shipper IRIs to order IRIs and inspect the destinations served by each carrier.

Endpoint: demo.openlinksw.comurn:demo.csv:northwind:dataEntity IRI: ?shipper · ?order
PREFIX csv: <http://demo.openlinksw.com/schemas/csv_northwind/>

SELECT DISTINCT
       (SAMPLE(?orderValue) AS ?order)
       (SAMPLE(?shipperValue) AS ?shipper)
       (SAMPLE(?shipperNameValue) AS ?shipperName)
       (SAMPLE(?orderDateValue) AS ?orderDate)
       (SAMPLE(?shippedDateValue) AS ?shippedDate)
       (SAMPLE(?shipCountryValue) AS ?shipCountry)
FROM <urn:demo.csv:northwind:data>
WHERE {
  ?shipperValue a csv:shippers ;
                csv:shipperid ?shipperId ;
                csv:companyname ?shipperNameValue .
  ?orderValue a csv:orders ;
              csv:orderid ?orderId ;
              csv:shipvia ?shipperId ;
              csv:orderdate ?orderDateValue ;
              csv:shippeddate ?shippedDateValue ;
              csv:shipcountry ?shipCountryValue .
}
GROUP BY ?orderId
ORDER BY DESC(SAMPLE(?shippedDateValue))
LIMIT 20
SELECT • Cross-table aggregation

Customer Gross Sales with Traceable Orders

Rank customer activity while retaining customer and sample-order IRIs for drill-through and provenance.

Endpoint: demo.openlinksw.comurn:demo.csv:northwind:dataEntity IRI: ?customer · ?sampleOrder
PREFIX csv: <http://demo.openlinksw.com/schemas/csv_northwind/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>

SELECT DISTINCT
       (SAMPLE(?customerValue) AS ?customer)
       (SAMPLE(?companyNameValue) AS ?companyName)
       (SAMPLE(?orderValue) AS ?sampleOrder)
       ?grossSales
FROM <urn:demo.csv:northwind:data>
WHERE {
  ?customerValue a csv:customers ;
                 csv:customerid ?customerId ;
                 csv:companyname ?companyNameValue .
  ?orderValue a csv:orders ;
              csv:customerid ?customerId .
  {
    SELECT ?customerId
           (SUM(xsd:decimal(?unitPrice) * xsd:decimal(?quantity)) AS ?grossSales)
    FROM <urn:demo.csv:northwind:data>
    WHERE {
      {
        SELECT DISTINCT ?customerId ?orderId ?productId ?unitPrice ?quantity
        FROM <urn:demo.csv:northwind:data>
        WHERE {
          ?salesOrder a csv:orders ;
                      csv:customerid ?customerId ;
                      csv:orderid ?orderId .
          ?salesDetail a csv:orders_details ;
                       csv:orderid ?orderId ;
                       csv:productid ?productId ;
                       csv:unitprice ?unitPrice ;
                       csv:quantity ?quantity .
        }
      }
    }
    GROUP BY ?customerId
  }
}
GROUP BY ?customerId ?grossSales
ORDER BY DESC(?grossSales)
LIMIT 15
SELECT • Time-series analytics

Monthly Gross Sales Trend

Track monthly order volume and gross sales while retaining a sample order IRI for drill-through.

Endpoint: demo.openlinksw.comurn:demo.csv:northwind:dataEntity IRI: ?sampleOrder
PREFIX csv: <http://demo.openlinksw.com/schemas/csv_northwind/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>

SELECT DISTINCT ?period
       (SAMPLE(?order) AS ?sampleOrder)
       (COUNT(DISTINCT ?orderId) AS ?orderCount)
       (SUM(xsd:decimal(?unitPrice) * xsd:decimal(?quantity)) AS ?grossSales)
FROM <urn:demo.csv:northwind:data>
WHERE {
  {
    SELECT ?orderId ?productId
           (SAMPLE(?orderValue) AS ?order)
           (SAMPLE(?orderDateValue) AS ?orderDate)
           (SAMPLE(?unitPriceValue) AS ?unitPrice)
           (SAMPLE(?quantityValue) AS ?quantity)
    FROM <urn:demo.csv:northwind:data>
    WHERE {
      ?orderValue a csv:orders ;
                  csv:orderid ?orderId ;
                  csv:orderdate ?orderDateValue .
      ?detailValue a csv:orders_details ;
                   csv:orderid ?orderId ;
                   csv:productid ?productId ;
                   csv:unitprice ?unitPriceValue ;
                   csv:quantity ?quantityValue .
    }
    GROUP BY ?orderId ?productId
  }
  BIND(SUBSTR(STR(?orderDate), 1, 7) AS ?period)
}
GROUP BY ?period
ORDER BY ?period
LIMIT 24
SELECT • Product performance analytics

Product Revenue Ranking

Rank products by gross sales and order reach while preserving a dereferenceable product IRI.

Endpoint: demo.openlinksw.comurn:demo.csv:northwind:dataEntity IRI: ?product
PREFIX csv: <http://demo.openlinksw.com/schemas/csv_northwind/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>

SELECT DISTINCT ?product ?productName
       (COUNT(DISTINCT ?orderId) AS ?orderCount)
       (SUM(xsd:decimal(?unitPrice) * xsd:decimal(?quantity)) AS ?grossSales)
FROM <urn:demo.csv:northwind:data>
WHERE {
  {
    SELECT ?productId
           (SAMPLE(?productValue) AS ?product)
           (SAMPLE(?productNameValue) AS ?productName)
    FROM <urn:demo.csv:northwind:data>
    WHERE {
      ?productValue a csv:products ;
                    csv:productid ?productId ;
                    csv:productname ?productNameValue .
    }
    GROUP BY ?productId
  }
  {
    SELECT ?orderId ?productId
           (SAMPLE(?unitPriceValue) AS ?unitPrice)
           (SAMPLE(?quantityValue) AS ?quantity)
    FROM <urn:demo.csv:northwind:data>
    WHERE {
      ?detailValue a csv:orders_details ;
                   csv:orderid ?orderId ;
                   csv:productid ?productId ;
                   csv:unitprice ?unitPriceValue ;
                   csv:quantity ?quantityValue .
    }
    GROUP BY ?orderId ?productId
  }
}
GROUP BY ?productId ?product ?productName
ORDER BY DESC(?grossSales)
LIMIT 20
SELECT • Workforce performance analytics

Employee Revenue Contribution

Compare employee-attributed order volume and gross sales with employee and sample-order IRIs for drill-through.

Endpoint: demo.openlinksw.comurn:demo.csv:northwind:dataEntity IRI: ?employee · ?sampleOrder
PREFIX csv: <http://demo.openlinksw.com/schemas/csv_northwind/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>

SELECT DISTINCT ?employee ?firstName ?lastName
       (SAMPLE(?order) AS ?sampleOrder)
       (COUNT(DISTINCT ?orderId) AS ?orderCount)
       (SUM(xsd:decimal(?unitPrice) * xsd:decimal(?quantity)) AS ?grossSales)
FROM <urn:demo.csv:northwind:data>
WHERE {
  {
    SELECT ?employeeId
           (SAMPLE(?employeeValue) AS ?employee)
           (SAMPLE(?firstNameValue) AS ?firstName)
           (SAMPLE(?lastNameValue) AS ?lastName)
    FROM <urn:demo.csv:northwind:data>
    WHERE {
      ?employeeValue a csv:employees ;
                     csv:employeeid ?employeeId ;
                     csv:firstname ?firstNameValue ;
                     csv:lastname ?lastNameValue .
    }
    GROUP BY ?employeeId
  }
  {
    SELECT ?employeeId ?orderId ?productId
           (SAMPLE(?orderValue) AS ?order)
           (SAMPLE(?unitPriceValue) AS ?unitPrice)
           (SAMPLE(?quantityValue) AS ?quantity)
    FROM <urn:demo.csv:northwind:data>
    WHERE {
      ?orderValue a csv:orders ;
                  csv:employeeid ?employeeId ;
                  csv:orderid ?orderId .
      ?detailValue a csv:orders_details ;
                   csv:orderid ?orderId ;
                   csv:productid ?productId ;
                   csv:unitprice ?unitPriceValue ;
                   csv:quantity ?quantityValue .
    }
    GROUP BY ?employeeId ?orderId ?productId
  }
}
GROUP BY ?employeeId ?employee ?firstName ?lastName
ORDER BY DESC(?grossSales)
LIMIT 20
SELECT • Geographic analytics

Destination-Country Sales Performance

Compare destination markets by order volume and gross sales while retaining a sample order IRI per country.

Endpoint: demo.openlinksw.comurn:demo.csv:northwind:dataEntity IRI: ?sampleOrder
PREFIX csv: <http://demo.openlinksw.com/schemas/csv_northwind/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>

SELECT DISTINCT ?country
       (SAMPLE(?order) AS ?sampleOrder)
       (COUNT(DISTINCT ?orderId) AS ?orderCount)
       (SUM(xsd:decimal(?unitPrice) * xsd:decimal(?quantity)) AS ?grossSales)
FROM <urn:demo.csv:northwind:data>
WHERE {
  {
    SELECT ?orderId ?productId
           (SAMPLE(?orderValue) AS ?order)
           (SAMPLE(?countryValue) AS ?country)
           (SAMPLE(?unitPriceValue) AS ?unitPrice)
           (SAMPLE(?quantityValue) AS ?quantity)
    FROM <urn:demo.csv:northwind:data>
    WHERE {
      ?orderValue a csv:orders ;
                  csv:orderid ?orderId ;
                  csv:shipcountry ?countryValue .
      ?detailValue a csv:orders_details ;
                   csv:orderid ?orderId ;
                   csv:productid ?productId ;
                   csv:unitprice ?unitPriceValue ;
                   csv:quantity ?quantityValue .
    }
    GROUP BY ?orderId ?productId
  }
}
GROUP BY ?country
ORDER BY DESC(?grossSales)
LIMIT 20
Interactive Exploration

Knowledge Graph Explorer🔗

Explore the interconnected concepts, standards, architectural tiers, and relationships defined in the companion RDF Knowledge Graph.

0 Nodes • 0 Links
Interactive Query Studio

SPARQL Query Workbench🔗

Execute live SPARQL 1.1 queries against demo.openlinksw.com to explore the virtualized Northwind named graph.

Interactive SPARQL Studio

Choose a pre-built query template or author a custom SPARQL query against the live dataset.

Endpoint: demo.openlinksw.com/sparql