Click here to Skip to main content
15,890,579 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
Hi,
I'm developing an application on Multi level marketing in which an user can have 5 underlying people and those 5 can have 5 underlying people and so on till 9 level.
At each level, there will be some point every user will get.
I wanna show the every user last week points (Wednesday to Tuesday) and total points from the date of joining.
Please help me to design the database for this and query also.
If any body can help me out here with the code, that will be great.

Bunch of thanks in advance.

What I have tried:

I am stuck at this point, so i need help
Posted
Updated 15-Jan-21 2:45am

1 solution

I would be looking at (googling) modelling tree structures in a database - there are a few approaches, the wizard of SQL, Joe Celko, has this approach (Adjacency lists) The Adjacency List Model for Trees - Part I[^]

Have a look here for other approaches Trees in SQL: Nested Sets and Materialized Path | BMC Communities[^]
 
Share this answer
 

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