<https://docs.linkeddatahub.com/user-guide/query-data/#live-example>
        a       <https://w3id.org/atomgraph/linkeddatahub#XHTML>;
        <http://www.w3.org/1999/02/22-rdf-syntax-ns#value>
                "<div xmlns=\"http://www.w3.org/1999/xhtml\">\n    <div>\n        <h2 id=\"live-example\">Live example</h2>\n        <p>The block below is not a code snippet — it is an actual query block embedded in this document, executing against the\n            <a href=\"https://northwind-traders.demo.linkeddatahub.com/\" target=\"_blank\">Northwind Traders dataspace</a>'s SPARQL endpoint. The query, the\n            service it runs against, and the block that places it here are three plain RDF resources in this very document.</p>\n    </div>\n</div>"^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral> .

<https://docs.linkeddatahub.com/user-guide/query-data/#northwind-query-block>
        a       <https://w3id.org/atomgraph/linkeddatahub#Object>;
        <http://www.w3.org/1999/02/22-rdf-syntax-ns#value>
                <https://docs.linkeddatahub.com/user-guide/query-data/#northwind-query>;
        <http://purl.org/dc/terms/title>
                "Query another dataspace" .

<https://docs.linkeddatahub.com/user-guide/query-data/#content>
        a       <https://w3id.org/atomgraph/linkeddatahub#XHTML>;
        <http://www.w3.org/1999/02/22-rdf-syntax-ns#value>
                "<div xmlns=\"http://www.w3.org/1999/xhtml\">\n    <p class=\"ldh-body-lg\">Learn how to query dataspace data with SPARQL, and save queries and charts</p>\n    <p>The <a href=\"../../reference/dataspace/#end-user\">end-user dataspace</a> dataset is queried through the SPARQL 1.1\n        endpoint at the dataspace's <samp>sparql</samp> URL (e.g. <samp>https://localhost:4443/sparql</samp>). All forms of SPARQL\n        queries are allowed; SPARQL updates are <em>not</em> allowed.</p>\n    <p>In the dataspace itself there is no separate editor page. A <a href=\"../../reference/data-model/resources/#queries\">query is a\n        resource</a> like any other — it lives in a document, it has a URI, and other resources refer to it. Placing one in a\n        <a href=\"../../reference/data-model/blocks/\">block</a> renders it as an interactive editor: the query text is editable, it runs\n        against the service the query names, and the results render below it in whichever\n        <a href=\"../../reference/user-interface/#layout-modes\">layout mode</a> suits them. Editing the block edits the resource, so a query\n        you refine is saved rather than retyped.</p>\n    <img alt=\"A query block with its editor open and results below\" src=\"/uploads/6ca06aeac11332cb14d522633b129ae7f3d7691f\"></img>\n    <p>This is the demo's top-selling-products query, which drives a chart on the Northwind Traders dataspace:</p>\n    <pre>PREFIX schema: &lt;https://schema.org/&gt;\n\nSELECT DISTINCT ?productName (SUM(?sale) AS ?totalSales)\nWHERE {\n    GRAPH ?orderGraph {\n        ?order schema:orderedItem ?orderItem .\n        ?orderItem schema:orderedItem ?product ;\n                   schema:price ?sale .\n    }\n    GRAPH ?productGraph {\n        ?product schema:name ?productName .\n    }\n}\nGROUP BY ?product ?productName\nORDER BY DESC(?totalSales)\nLIMIT 5</pre>\n    <p class=\"exhibit-links\">Source: <a href=\"https://github.com/AtomGraph/LinkedDataHub-Apps/blob/master/demo/northwind-traders/products.ttl\" target=\"_blank\">products.ttl</a> — the same query drives the <a href=\"https://northwind-traders.demo.linkeddatahub.com/products/\" target=\"_blank\">Top selling products chart</a></p>\n    <p>The endpoint is a standard SPARQL 1.1 Protocol service, so it can be queried programmatically as well:</p>\n    <pre>curl -k -G \"https://localhost:4443/sparql\" \\\n  -H \"Accept: application/sparql-results+json\" \\\n  --data-urlencode 'query=PREFIX schema: &lt;https://schema.org/&gt; SELECT (COUNT(*) AS ?orders) WHERE { GRAPH ?g { ?order a schema:Order } }'</pre>\n</div>"^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral> .

<https://docs.linkeddatahub.com/user-guide/query-data/>
        a       <https://w3id.org/atomgraph/linkeddatahub/document-hierarchy#Item>;
        <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1>
                <https://docs.linkeddatahub.com/user-guide/query-data/#content>;
        <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2>
                <https://docs.linkeddatahub.com/user-guide/query-data/#live-example>;
        <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3>
                <https://docs.linkeddatahub.com/user-guide/query-data/#northwind-query-block>;
        <http://www.w3.org/1999/02/22-rdf-syntax-ns#_4>
                <https://docs.linkeddatahub.com/user-guide/query-data/#content-saving>;
        <http://purl.org/dc/terms/created>
                "2026-09-29T09:52:54.971Z"^^<http://www.w3.org/2001/XMLSchema#dateTime>;
        <http://purl.org/dc/terms/creator>
                <https://admin.linkeddatahub.com/acl/agents/5ba81960-d511-4a3b-8b9a-cb5bb278dd95/#this>;
        <http://purl.org/dc/terms/description>
                "Learn how to query dataspace data with SPARQL, and save queries and charts";
        <http://purl.org/dc/terms/title>
                "Query data";
        <http://rdfs.org/sioc/ns#has_container>
                <https://docs.linkeddatahub.com/user-guide/>;
        <http://www.w3.org/ns/auth/acl#owner>
                <https://admin.linkeddatahub.com/acl/agents/5ba81960-d511-4a3b-8b9a-cb5bb278dd95/#this> .

<https://docs.linkeddatahub.com/user-guide/query-data/#northwind-service>
        a       <http://www.w3.org/ns/sparql-service-description#Service>;
        <http://purl.org/dc/terms/title>
                "Northwind Traders SPARQL service";
        <http://www.w3.org/ns/sparql-service-description#endpoint>
                <https://northwind-traders.demo.linkeddatahub.com/sparql>;
        <http://www.w3.org/ns/sparql-service-description#supportedLanguage>
                <http://www.w3.org/ns/sparql-service-description#SPARQL11Query> .

<https://docs.linkeddatahub.com/user-guide/query-data/#northwind-query>
        a                             <http://spinrdf.org/sp#Select>;
        <http://purl.org/dc/terms/title>
                "Sample of the Northwind Traders dataset";
        <http://spinrdf.org/sp#text>  "SELECT *\nWHERE {\n    GRAPH ?g {\n        ?s ?p ?o\n    }\n}\nLIMIT 10";
        <https://w3id.org/atomgraph/linkeddatahub#service>
                <https://docs.linkeddatahub.com/user-guide/query-data/#northwind-service> .

<https://docs.linkeddatahub.com/user-guide/query-data/#content-saving>
        a       <https://w3id.org/atomgraph/linkeddatahub#XHTML>;
        <http://www.w3.org/1999/02/22-rdf-syntax-ns#value>
                "<div xmlns=\"http://www.w3.org/1999/xhtml\">\n    <div>\n        <h2 id=\"save-query\">Saving queries</h2>\n        <p>To save the query string currently in the editor, click the <span class=\"ac-btn in-neutral ap-outline sz-md\">Save</span> button underneath the editor form. A document creation form opens with the query\n            string pre-filled; you only need to supply titles for the query and its document. You can then access the query by navigating to the query container via the dropdown in the\n            <a href=\"../../reference/user-interface/#action-bar\" target=\"_blank\">breadcrumb bar</a>.</p>\n        <p>The editor will not save a query that is not valid SPARQL 1.1.</p>\n    </div>\n    <div>\n        <h2 id=\"save-chart\">Saving charts</h2>\n        <p>The SPARQL editor includes an interactive chart pane which can be used to visualize the query results. You can change the chart type, select its category and one or more series.</p>\n        <p>The chart pane handles both graph results (<code>CONSTRUCT</code>, <code>DESCRIBE</code>) and result sets (<code>SELECT</code>). For graph results, the category and series are\n            rendered from resource properties; for result sets, they are rendered from variable names.</p>\n        <p>To save the chart with the properties currently selected, click the <span class=\"ac-btn in-primary ap-solid sz-md\">Save</span> button underneath the chart pane. Two document creation forms open: one for\n            the query, one for the chart that depends on it. The query string and chart properties are pre-filled; you only need to\n            supply titles for the query, the chart and their document. You can then access the chart by navigating to the chart container via the dropdown in the\n            <a href=\"../../reference/user-interface/#action-bar\" target=\"_blank\">breadcrumb bar</a>.</p>\n    </div>\n    <p class=\"ldh-body-lg\">See charts in action in the <a href=\"../../tutorial/insight/\">Insight</a> tutorial stage, or read more about <a href=\"../../reference/data-model/resources/#charts\">charts</a>.</p>\n</div>"^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral> .
