I've no idea how to manage and optimize this query:
I've four table.
- User (userId, name)
- Member (memberId, name, ownerId) The ownerId = user.userId
- PresentPeople (activityId, presentId, ...) so presentId = memberId
- Activity (activityId, ownerId, startDate...) and ownerId = user.userId
So here for an user, I need members created by this user, and for this members I need the list of presentPeople for the activity that theyjoined. But I don't know how to get this list because they are in the list.
Not sure if i'm clear there,
Big help would be very helpfull :))
View Complete Post