Skip to content

Aggregates seem to be not implemented #8

Description

@larisa1995

For example

@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix ex: <http://www.example.com/> .
@prefix jj: <http://ontology.yy.org/xx/jj#> .
@prefix grel: <http://users.ugent.be/~bjdmeest/function/grel.ttl#> .
@prefix ff: <http://ontology.yy.org/xx/ff#> .

ex:ne_1 rdf:type jj:Entity ;
	skos:notation "ne_1" .

ex:ne_2 rdf:type jj:Entity ;
	skos:notation "ne_2" .

ex:ne_3 rdf:type jj:Entity ;
	skos:notation "ne_3" .

ex:qq_1 ff:hasElementCollectionUnordered ex:qq_1_uoc1 ;
	rdf:type jj:Entity ;
	skos:notation "qq_1" .

ex:qq_1_uoc1 ff:hasElementPart ex:ne_1, ex:ne_2 ;
	rdf:type ff:ff_UnorderedCollection ;
	skos:notation "qq_1_uoc1" .

ex:qq_2 ff:hasElementCollectionUnordered ex:qq_2_uoc1 ;
	rdf:type jj:Entity ;
	skos:notation "qq_2" .

ex:qq_2_uoc1 ff:hasElementPart ex:ne_2, ex:ne_3 ;
	rdf:type ff:ff_UnorderedCollection ;
	skos:notation "qq_2_uoc1" .

and query

prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
prefix xsd: <http://www.w3.org/2001/XMLSchema#>
prefix sd: <http://www.w3.org/ns/sparql-service-description#>
prefix ex: <http://www.example.com/>
prefix ff: <http://ontology.yy.org/xx/ff#> 
prefix grel: <http://users.ugent.be/~bjdmeest/function/grel.ttl#>
prefix skos: <http://www.w3.org/2004/02/skos/core#>
prefix ex: <http://www.example.com/>

SELECT ?nePartName (count(distinct ?ne) as ?count)
WHERE
{
	?nePart ^ff:hasElementPart/^ff:hasElementCollectionUnordered ?ne ; skos:notation ?nePartName .
	
} 
GROUP BY ?nePartName
HAVING (?count > 1)
LIMIT 5

I get in apache-jena\bat\sparql.bat result

nePartName,count
ne_2,2

In https://atomgraph.github.io/SPARQL-Playground/ I get empty table.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions