
I need to Create the Table exam_schoolresults with the following Column
school_code
project_id
with_results(total student with Div-I-O)
sch_avg (calculate average from studentfinalresults)
sch_avg_grd(depends on sch_avg in Model GradingRule)
sch_avg_status(depends on sch_avg in Model GradingRule)

sch_gpa(Calculated using the Two  ProcessedSubjectScore and StudentFinalResult where sch_gpa = Subject_GPA+Division_GPA)/2 WHERE For Academic Level ID=2 Subject_GPA =  Total no of A x 1 + no of B x 2 + no of C x 3 + no of D x 4 + no of E x 5 + no of S x 6 + no of F x 7)/Total of A,B,C,D,E,S,F; For Academic Leve ID l=1 Subject_GPA =  Total no of A x 1 + no of B x 2 + no of C x 3 + no of D x 4 + no of F x 5)/Total of A,B,C,D,F; For Academic Level ID=3 Subject_GPA =  Total no of A x 1 + no of B x 2 + no of C x 3 + no of D x 4 + no of E x 5)/Total of A,B,C,D,E;. Division_GPA for Academic Level ID = 1 and 2 Apply the same Rule For Division_GPA = Total no of Division I X 1 + no of Division I X 1 + no of Division II X 2 + no of Division III X 3 + no of Division IV X 4 +  no of Division 0 X 5)/Total of Division I,II,III,IV,0. Division_GPA for Academic Level ID = 3 is Calculated by No of Student with Average of A X 1 + no of Average B X 2 + no of Average C X 3 + no of Average D X 4 +  no of Average E X 5)Total number of Student average of A-E
sch_gpa_grade(depends on sch_gpa to be lookup in gpa_grade Model GpaRule)
sch_gpa_status(depends on sch_gpa to be lookup in gpa_status Model GpaRule)
sch_release_status(True, False - default=0)
sch_rank_involvement(True, False - default=1)





I need to Create the Table exam_subjectsresults with the following Column
school_code
project_id
with_results(total student with Div-I-O)
subj_avg (calculate average from studentfinalresults)
subj_avg_grd(depends on sch_avg in Model GradingRule)
subj_avg_status(depends on sch_avg in Model GradingRule)

subj_gpa -Calculated  WHERE For Academic Level ID=2 Subject_GPA =  Total no of A x 1 + no of B x 2 + no of C x 3 + no of D x 4 + no of E x 5 + no of S x 6 + no of F x 7)/Total of A,B,C,D,E,S,F; For Academic Leve ID l=1 Subject_GPA =  Total no of A x 1 + no of B x 2 + no of C x 3 + no of D x 4 + no of F x 5)/Total of A,B,C,D,F; For Academic Level ID=3 Subject_GPA =  Total no of A x 1 + no of B x 2 + no of C x 3 + no of D x 4 + no of E x 5)/Total of A,B,C,D,E
subj_gpa_grade(depends on sch_gpa to be lookup in gpa_grade Model GpaRule)
subj_gpa_status(depends on sch_gpa to be lookup in gpa_status Model GpaRule)
subj_release_status(True, False - default=0)
subj_rank_involvement(True, False - default=1)



from project_marks_subjects - i need to create template like that with the Main Process Button on the Top That will process subjectfinal score,grade, points from ExamScore depends on the number of paper set at ExamSubject and move those score,grade,point to ProcessedSubjectScore (*if number of Paper from ExamSubject = 1 process will base on the actual score just process grade, and point based on the predifined GradingRule - if number of Paper = 1.5 then it will look the FORMULA is to check score of those (subject code of two paper_code *if sat for one also it will be counted as 0)/150X100, if number of paper = 2 Then paper_code1+paper_code2 of that subjectcode of student)/200X100 and if number of paper = 2.5 then paper_code1+paper_code2+paper_code3 of that subjectcode of student)/250X100

Make it Fast because we might have 200k rows from ExamScore to process to 100k rows to ProcessedSubjectScore. I have given the example from Excel

