Distinct subjects
830
Number of triples
11073
WasGeneratedBy
Orders
Distinct subjects
2155
Number of triples
10775
WasGeneratedBy
Order details

Order details

Text
PREFIX foaf:       <http://xmlns.com/foaf/0.1/>
PREFIX dct:        <http://purl.org/dc/terms/>
PREFIX schema:     <https://schema.org/>
PREFIX xsd:        <http://www.w3.org/2001/XMLSchema#>

CONSTRUCT
{
    GRAPH ?graph
    {
        ?order schema:orderedItem ?orderItem .

        ?orderItem a schema:OrderItem ;
            schema:orderedItem ?product ;
            schema:orderQuantity ?quantity ;
            schema:discount ?discount ;
            schema:price ?price .
    }
}
WHERE
{
    ?order_detail_row <#orderID> ?orderID ;
        <#productID> ?productID ;
        <#unitPrice> ?unitPrice ;
        <#quantity> ?quantityString ;
        <#discount> ?discountString .

    BIND(uri(concat(str($base), "orders/", encode_for_uri(?orderID), "/")) AS ?graph)
    BIND(uri(concat(str(?graph), "#this")) AS ?order)
    BIND(uri(concat(str(?graph), "#", STRUUID())) AS ?orderItem)
    BIND(uri(concat(str($base), "products/", encode_for_uri(?productID), "/#this")) AS ?product)
    BIND (STRDT(?unitPrice, xsd:float) AS ?price)
    BIND (STRDT(?quantityString, xsd:integer) AS ?quantity)
    BIND (STRDT(?discountString, xsd:float) AS ?discount)
}
Title
Order details

Order details

Delimiter
,
EndedAtTime
16 June 2026 21:30
File
order_details.csv
Query
Order details
StartedAtTime
16 June 2026 21:04
Title
Order details

order_details.csv

FileName
order_details.csv
Format
csv
Sha1sum (hex)
6818fb4a761468a0ceb2ee7a224b0fa84859e491
Title
order_details.csv

order_details.rq

FileName
order_details.rq
Format
plain
Sha1sum (hex)
bcc85bc6e7dca59059f8216c6b46da3cfc266d9c
Title
order_details.rq

Orders

Text
PREFIX foaf:       <http://xmlns.com/foaf/0.1/>
PREFIX dct:        <http://purl.org/dc/terms/>
PREFIX schema:     <https://schema.org/>
PREFIX xsd:        <http://www.w3.org/2001/XMLSchema#>

CONSTRUCT
{
    GRAPH ?graph
    {
        ?graph dct:title ?orderID ;
            foaf:primaryTopic ?order ;
            foaf:topic ?orderDelivery, ?deliveryAddress .

        ?order a schema:Order ;
            schema:identifier ?orderID ;
            dct:title ?orderID ;
            schema:customer ?customer ;
            schema:broker ?employee ;
            schema:orderDate ?orderDate ;
            schema:orderDelivery ?orderDelivery .

        ?orderDelivery a schema:ParcelDelivery ;
            foaf:page ?graph ;
            schema:expectedArrivalUntil ?requiredDate ;
            # ?shippedDate ;
            schema:deliveryAddress ?deliveryAddress ;
            schema:provider ?shipper .

        ?deliveryAddress a schema:PostalAddress ;
            foaf:page ?graph ;
            schema:addressCountry ?shipCountry ;
            schema:addressLocality ?shipCity ;
            schema:postalCode ?shipPostalCode ;
            schema:streetAddress ?shipAddress ;
            schema:location ?deliveryLocation ;
            schema:addressRegion ?shipRegion .
    }
}
WHERE
{
    ?order_row <#orderID> ?orderID ;
        <#customerID> ?customerID ;
        <#employeeID> ?employeeID ;
        <#orderDate> ?orderDateString ;
        <#requiredDate> ?requiredDateString ;
        <#shipVia> ?shipVia ;
        <#freight> ?freightString ;
        <#shipName> ?shipName ;
        <#shipAddress> ?shipAddress ;
        <#shipCity> ?shipCity ;
        <#shipPostalCode> ?shipPostalCode ;
        <#shipCountry> ?shipCountry .

    OPTIONAL {
        ?order_row <#shippedDate> ?shippedDateString
        BIND(strdt(?shippedDateString, xsd:date) AS ?shippedDate)
    }
    OPTIONAL {
        ?order_row <#shipRegion> ?shipRegion
    }

    BIND(uri(concat(str($base), "orders/")) AS ?container)
    BIND(uri(concat(str(?container), encode_for_uri(?orderID), "/")) AS ?graph)
    BIND(uri(concat(str(?graph), "#this")) AS ?order)
    BIND(uri(concat(str(?graph), "#delivery")) AS ?orderDelivery)
    BIND(uri(concat(str(?graph), "#delivery-address")) AS ?deliveryAddress)
    BIND(uri(concat(str($base), "employees/", encode_for_uri(?employeeID), "/#this")) AS ?employee)
    BIND(uri(concat(str($base), "customers/", encode_for_uri(?customerID), "/#this")) AS ?customer)
    BIND(uri(concat(str($base), "shippers/", encode_for_uri(?shipVia), "/#this")) AS ?shipper)
    BIND(strdt(?orderDateString, xsd:date) AS ?orderDate)
    BIND(strdt(?requiredDateString, xsd:date) AS ?requiredDate)
    BIND(strdt(?freightString, xsd:float) AS ?freight)
}
Title
Orders

Orders

Delimiter
,
EndedAtTime
16 June 2026 21:12
File
orders.csv
Query
Orders
StartedAtTime
16 June 2026 21:04
Title
Orders
Category variable name
country
Chart type
BarChart
Query
Orders by country
Series variable name
orderCount
Title
Orders by country

Orders by country

Text
PREFIX schema: <https://schema.org/>

SELECT ?country (COUNT(DISTINCT ?order) AS ?orderCount)
WHERE {
    GRAPH ?orderGraph {
        ?order schema:orderDelivery ?delivery .
        ?delivery schema:deliveryAddress ?address .
        ?address schema:addressCountry ?country .
    }
}
GROUP BY ?country
ORDER BY DESC(?orderCount)
LIMIT 10
Title
Orders by country

Orders by month

Text
PREFIX schema: <https://schema.org/>

SELECT ?month (COUNT(DISTINCT ?order) AS ?orderCount)
WHERE {
    GRAPH ?orderGraph {
        ?order a schema:Order ;
               schema:orderDate ?orderDate .
        BIND(SUBSTR(STR(?orderDate), 1, 7) AS ?month)
    }
}
GROUP BY ?month
ORDER BY ?month
Title
Orders by month
Category variable name
month
Chart type
LineChart
Query
Orders by month
Series variable name
orderCount
Title
Orders per month

orders.csv

FileName
orders.csv
Format
csv
Sha1sum (hex)
3c23e13529beb208a8b24d1eb7f6737d846355b5
Title
orders.csv

orders.rq

FileName
orders.rq
Format
plain
Sha1sum (hex)
9ec3ba9382026d59cbd80e98ee1222dbdb49bc8f
Title
orders.rq
Category variable name
year
Chart type
Table
Query
Sales by region per year
Series variable name
regionName
totalSales
Title
Sales by region per year
Text
PREFIX  schema: <https://schema.org/>
PREFIX  xsd:  <http://www.w3.org/2001/XMLSchema#>

SELECT DISTINCT  ?year ?regionName (SUM(?sale) AS ?totalSales)
WHERE
  { GRAPH ?orderGraph
      { ?order  schema:orderDate    ?orderDate ;
                schema:broker       ?employee ;
                schema:orderedItem  ?orderItem
        BIND(year(xsd:dateTime(?orderDate)) AS ?year)
        ?orderItem  schema:orderedItem  ?product ;
                  schema:orderQuantity  ?quantity ;
                  schema:price          ?price
        BIND(( ?quantity * ?price ) AS ?sale)
      }
    GRAPH ?employeeGraph
      { ?employee  schema:areaServed  ?territory }
    GRAPH ?territoryGraph
      { ?territory  schema:containedInPlace  ?region }
    GRAPH ?regionGraph
      { ?region  schema:name  ?regionName }
  }
GROUP BY ?year ?regionName
ORDER BY DESC(?year) ?regionName
LIMIT   100
Title
Sales by region per year

Select orders

Text
PREFIX  schema: <https://schema.org/>

  SELECT DISTINCT  ?order
  WHERE
    { GRAPH ?doc
        { ?order  a                  schema:Order ;
                  schema:identifier  ?orderID ;
                  schema:orderDate   ?orderDate ;
                  schema:customer    ?customer ;
                  schema:broker      ?employee
        }
    }
  ORDER BY ?orderID
Title
Select orders

select-orders-view

Layout mode
Table
Query
Select orders