Click here to Skip to main content
15,888,088 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have database somting like:
{
StudentTests:[
Test1:{Subject1:"s1",Marks:65},
Test2:{Subject2:"s2",Marks:55},..,..
],
StudentId:"1",
StudentName:"A"
},
{
Student2
},
{
Student3
},
and so on
Total 100 Documents.

What I have tried:

I was querying like to find highest marks among subject1. So, that I achieved using query : select MAX(s.marks) from c join STests in c.StudentTests join s in STests.Test1

But that is returning me just a value of maximum of marks of subject1. I wanted to find the max value with student max marks. Somthing like :
{StudentId : "5", Marks : 99}

So Is it possible to join marks with id?
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900