How to output Entity + AnotherEntityList in Advanced SQL

Imagine i have a database similiar to the one in the image.

How to i get the data from the student and his classes being student.id = 1 is enrolled in.

Also, how can this be done using aggregates

Hello Tony,

Using aggregates, you should be able to pick Enrollments and Classes entities as Source, apply OnlyWith join between two on ClassID attribute and under Filter section specify the Enrollments.StudentID=1 (or whatever local variable or input parameter you have to pass in the StudentID). The resultant classes can then be used for further processing.

Hope this helps!

Thanks,

Junaid


Junaid Ahmed Syed wrote:

Thank you for awnsering junaid, i forgot to type everything.

I need the student information, and the list of classes he is enroled in




Tony Carreira wrote:

Junaid Ahmed Syed wrote:

Thank you for awnsering junaid, i forgot to type everything.

I need the student information, and the list of classes he is enroled in





In that case you would have to join the Student entity as well. Assuming there are multiple classes for each student, same number of records would be returned.

Hi Tony,

In attachment you'll find a small example of how to do this using one aggregate.

Hope this helps!