You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
val course = Course()
val student1 = Student(course, 15)
val student2 = Student(course, 30)
val instructor1 = Instructor(course, 50)
val instructor2 = Instructor(course, 15)
The query returns 0 rows.
This is because it has 2 instructors and 2 students,
left joining both will multiply the results.
Meaning that the query now thinks sum of tuition is 90 and sum of payment is 130.
I need help to construct a solution where it's possible to get the correct numbers from the sum() calls so that these numbers can be correctly compared for each course.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
The query:
Data
The query returns 0 rows.
This is because it has 2 instructors and 2 students,
left joining both will multiply the results.
Meaning that the query now thinks sum of tuition is 90 and sum of payment is 130.
I need help to construct a solution where it's possible to get the correct numbers from the sum() calls so that these numbers can be correctly compared for each course.
Project can be found here: school.zip
Beta Was this translation helpful? Give feedback.
All reactions