From a7c9ea3394cc8604e8ac2baeb927d50b701f2606 Mon Sep 17 00:00:00 2001 From: Pjotr Prins Date: Sun, 20 Aug 2023 11:36:39 +0200 Subject: SPARQL count datasets --- api/sparql-endpoint.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'api/sparql-endpoint.md') diff --git a/api/sparql-endpoint.md b/api/sparql-endpoint.md index d0f1fdb..0b04c6b 100644 --- a/api/sparql-endpoint.md +++ b/api/sparql-endpoint.md @@ -104,6 +104,25 @@ Another way to list datasets with the name that is used in GN: } ``` +To list all datasets + +``` + SELECT DISTINCT ?dataset ?datasetName WHERE { + ?dataset rdf:type/rdfs:subClassOf gnc:dataset . + ?dataset rdfs:label ?datasetName . + + } +``` + +And count them! + +``` + SELECT count(?dataset) WHERE { + ?dataset rdf:type/rdfs:subClassOf gnc:dataset . + } +``` + +893 at last count(!) - info_dataset("CB_M_1004_P") - Get meta information about a data set using the GN name: -- cgit v1.2.3