diff options
author | Pjotr Prins | 2023-08-20 11:36:39 +0200 |
---|---|---|
committer | Pjotr Prins | 2023-08-20 11:36:39 +0200 |
commit | a7c9ea3394cc8604e8ac2baeb927d50b701f2606 (patch) | |
tree | 9b5554094ae981ed880f42d9e8c05eaa2eaafc17 | |
parent | a7cbd689f344c4a3afd0903d09cdfb82bccd4c96 (diff) | |
download | gn-docs-a7c9ea3394cc8604e8ac2baeb927d50b701f2606.tar.gz |
SPARQL count datasets
-rw-r--r-- | api/sparql-endpoint.md | 19 |
1 files changed, 19 insertions, 0 deletions
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: |