Michel;  To count a set of values, you'll need to use GROUP BY to group your results by the item you want to aggregate and sum the object values.  Looking at your data I'm guessing you want to sum all of the values from the depc:hasTimePointProperty where the value is found in the depc:TimePointProperty instances.  Given these assumptions, the sub-select will look something like the below:

SELECT ?part ((SUM(xsd:float(?eProduction2))) AS ?eProduction1)
WHERE {
            ?this dcterms:hasPart ?part .
            ?part depc:hasComplexProperty ?ProfileProperty2 .
            ?ProfileProperty2 depc:hasTimePointProperty ?TimePointProperty1 .
            ?TimePointProperty2 depc:e-Production ?eProduction2 .
            ?TimePointProperty2 depc:timeStamp ?timeStamp1 .
}  GROUP BY ?part

See if that give you the results you are looking for.  The general idea is to group by the thing you need to aggregate, then perform the count/sum/etc. on the object with the desired values.

-- Scott

On 5/15/2014, 3:16 PM, Bohms, H.M. (Michel) wrote:

Hi Scot,

 

Thx for the latest query. Inow understand but still see no inferences.

 

Current query:

CONSTRUCT {

    ?this depc:hasComplexProperty ?ProfileProperty1 .

    ?ProfileProperty1 a depc:ProfileProperty .

    ?ProfileProperty1 depc:hasTimePointProperty ?TimePointProperty1 .

    ?TimePointProperty1 a depc:TimePointProperty .

    ?TimePointProperty1 depc:e-Production ?eProduction1 .

    ?TimePointProperty1 depc:timeStamp ?timeStamp1 .

}

WHERE {

    {

        SELECT ((SUM(?eProduction2)) AS ?eProduction1)

        WHERE {

            ?this dcterms:hasPart ?part .

            ?part depc:hasComplexProperty ?ProfileProperty2 .

            ?ProfileProperty2 depc:hasTimePointProperty ?TimePointProperty1 .

            ?TimePointProperty2 depc:e-Production ?eProduction2 .

            ?TimePointProperty2 depc:timeStamp ?timeStamp1 .

        }

    } .

}

 

What I try to do is derived for the Neighbourhood individual a value for its total energy production as sum of the existing energy productions of its parts (for which values are given). (one value for each dateTimeStamp).

 

Any hint to my thinking error is very welcome! (maybe the path in the construct should be generated differently?)

Michel




Dit bericht kan informatie bevatten die niet voor u is bestemd. Indien u niet de geadresseerde bent of dit bericht abusievelijk aan u is toegezonden, wordt u verzocht dat aan de afzender te melden en het bericht te verwijderen. TNO aanvaardt geen aansprakelijkheid voor de inhoud van deze e-mail, de wijze waarop u deze gebruikt en voor schade, van welke aard ook, die verband houdt met risico's verbonden aan het elektronisch verzenden van berichten.

 

This message may contain information that is not intended for you. If you are not the addressee or if this message was sent to you by mistake, you are requested to inform the sender and delete the message. TNO accepts no liability for the content of this e-mail, for the manner in which you use it and for damage of any kind resulting from the risks inherent to the electronic transmission of messages.

--
-- You received this message because you are subscribed to the Google
Group "TopBraid Suite Users", the topics of which include Enterprise Vocabulary Network (EVN), TopBraid Composer, TopBraid Live, TopBraid Insight, SPARQLMotion, SPARQL Web Pages and SPIN.
To post to this group, send email to
[email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/topbraid-users?hl=en
---
You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.

--
-- You received this message because you are subscribed to the Google
Group "TopBraid Suite Users", the topics of which include Enterprise Vocabulary Network (EVN), TopBraid Composer, TopBraid Live, TopBraid Insight, SPARQLMotion, SPARQL Web Pages and SPIN.
To post to this group, send email to
[email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/topbraid-users?hl=en
---
You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to