答案 0 :(得分:0)
尝试这个逻辑,希望它有所帮助。
// Delete confirmation
if (MessageBox.Show ("The operation cannot be undone! Continue?", "Delete",
MessageBoxButtons.YesNo, MessageBoxIcon.Question)
== DialogResult.Yes)
{
//Delete the row
}
答案 1 :(得分:0)
我认为你每年都需要它。
Select year, id_lesson,
Sum(case when term = 1 then exam_1 end) exam_1_term_1,
Sum(case when term = 1 then exam_2 end) exam_2_term_1,
Sum(case when term = 2 then exam_1 end) exam_1_term_2,
Sum(case when term = 2 then exam_2 end) exam_2_term_2,
Sum(case when term = 3 then exam_1 end) exam_1_term_3,
Sum(case when term = 3 then exam_2 end) exam_2_term_3
From your_table
Group by id_lesson, year;