|
From: Tomek P. <plo...@gm...> - 2013-04-01 20:34:20
|
Hi Rob
Please try the following code:
TripleStore store = new TripleStore();
store.LoadFromUri(UriFactory.Create("http://semanticsage.home.lc/files/LearningStyles.rdf"));
Options.AlgebraOptimisation = false;
var graph = (IGraph)store.ExecuteQuery(@"prefix sage:
<http://www.semanticsage.home.lc/LearningStyles.owl#>
prefix xsd: <http://www.w3.org/2001/XMLSchema#>
prefix : <http://semanticsage.home.lc/files/LearningStyles.rdf#>
CONSTRUCT
{
?MTech :max ?maxScore
}
WHERE
{
SELECT ?MTech max(?max) as ?maxScore
WHERE
{
SELECT ?MTech ?LessonType sum(?hasValue) as ?max
WHERE
{
?MTech sage:attendsLessons ?Lesson.
?Lesson sage:hasLessonType ?LessonType.
?MTech sage:undergoesEvaluation ?Quiz.
?Quiz sage:isForLesson ?Lesson.
?MTech sage:hasQuizMarks ?QuizMarks.
?QuizMarks sage:belongsToQuiz ?Quiz.
?QuizMarks sage:hasValue ?hasValue.
?Lesson sage:inRound '1'^^xsd:int.
}
GROUP BY ?MTech ?LessonType
}
GROUP BY ?MTech
}");
The above query works fine in Leviathan demo.
However on my box instead of actual values I get all ?maxScore bound
to "0"@xsd:int. I'm running this using the latest dll from trunk,
Thanks,
Tom
|