考勤表重組考勤表邏輯
id | rollno | faculty | date | PresentAbsent
---|---------|---------|------------|--------------
1 | RP1201 | ABC | 12/12/2016 | P
2 | RP1202 | ABC | 12/12/2016 | A
休假表
Lid | rollno | startdate | enddate | full-half-day | time
----|--------|------------|------------|---------------|---------------
1 | RP1201 | 11/12/2016 | 12/12/2016 | fullday | Not applicable
2 | RP1202 | 12/12/2016 | 12/12/2016 | halfday | 10.30-11.30
所需的報表
rollno | totallecture | totalpresent | totalabsent | totalleave | withoutLeave% | withLeave%
-------|--------------|--------------|-------------|------------|---------------|-----------
RP1201 | 12 | 6 | 6 | 2 | 50% | 66.66%
從上表的邏輯在啓動它工作正常,但表項增加系統有更多時間來計算報告。
請幫我改表的邏輯,幫助我在幾秒鐘
請任何其他建議,將不勝感激
您可以再添加一列來計算每月出現的天數。 – Prajwal
@Prajwal感謝您在哪個表中回覆 – Pravin
您可能需要更改整個結構。 – Prajwal