From: mkdspl via SQLMonster.com on
Dear friends,

I have table named, [customers_mst] with fields are

IDNO
SponserIDNo
Placement
Name
StageB1
StageB2
BinaryBudget

------------------------------------------------------------------------------
-----

Now If a person name X join the plan then

IDNO :- 101
SponserIDNo :- 100
Placement :- LEFT
Name :- X
StageB1 :- 300 (this is the 1st stage binary amount, 1:2 OR 2:1)
StageB2 :- 300 (this is the 2nd stage binary amount, 1:1)
BinaryBudget :- 1200 (this is our binary budget)

----------------------------------------------------------------------------

and some more data entered in database now i have to calculate binary as per
following rules

1:2 OR 2:1 means

X
/ \
/ \
Y Z
/
/
A

now the id X is quilified for payout and X get 300 RS. as per our logic.

So please tell me that how i query this things
or anyone have any other great idea of desiging table in different way then
please suggest me.
Thank You

--
Message posted via http://www.sqlmonster.com

From: Plamen Ratchev on
Can you please provide CREATE TABLE statements, INSERT statements for sample data, and the desired results. Also, the
rules for the calculations do not seem clear, it will help to describe in better detail.

--
Plamen Ratchev
http://www.SQLStudio.com