Using calculation in user-end made my application too slow.
So I am trying to make such calculation in server and just call dataTable in use-end
For this I need a sql query that is able to generate following desired View.
Primary information about basic Tables are as follows.
I tried to use different sql builder with no success.
Please help me
Thanking you in advance
I have 4 tables as
Table1 (students_Detail)
Expand|Select|Wrap|Line Numbers
- studID studName gradeID address
- --------------------------------------
- 1 Name1 1 add
- 2 Name2 1 add
- 3 Name3 2 add
- 4 Name4 2 add
Expand|Select|Wrap|Line Numbers
- FeeID FeeDetail
- -----------------
- 1 Admission
- 2 Monthly Fee
- 3 Vehicle Fee
- 4 Medical Fee
Expand|Select|Wrap|Line Numbers
- sn FeeID gradeID Rate
- 1 1 1 1000
- 2 1 2 1200
- 3 2 1 1500
- 4 2 2 1600
- 5 3 1 800
- 6 3 2 900
Expand|Select|Wrap|Line Numbers
- studID FeeID DiscPercent
- 1 1 100
- 1 2 50
- 1 3 10
- 1 4 50
- 2 1 50
- 2 2 10
Now I need SQL to browse these data as follows
Desired View
Expand|Select|Wrap|Line Numbers
- studID studName FeeDetail Total Discount NetAmount
- ---------------------------------------------------------------------------
- 1 Name1 Admission 1000 1000 0
- 1 Name1 Montly Fee 1200 600 600
- 1 Name1 Vehicle Fee 1500 150 1350
- 1 Name1 Medical Fee 1600 800 800
- 2 Name2 Admission 1000 500 500
- 2 name2 Montly Fee 1200 120 1150
- 2 Name2 Vehicle Fee 1500 0 1500
- 2 Name2 Medical Fee 1600 0 1600