Current location - Training Enrollment Network - Mathematics courses - Calculate the total score by choosing Chinese+Mathematics+English as the total score from the table name. If there are 100 subjects, is there a simple way to calculate the total score?
Calculate the total score by choosing Chinese+Mathematics+English as the total score from the table name. If there are 100 subjects, is there a simple way to calculate the total score?
If there are 100 accounts, are there 100 account fields? 100 is there a 100 topic field?

If so, then this data structure design is incorrect.

Recommended data structure design:

I. Chart of Accounts:

Account ID, account name

1, Chinese

2. Mathematics

Second, the score sheet:

Student ID, subject ID, subject ID, subject description, score.

123, 1, 1, the first question 10

123, 1 2, question 2, 8

123 2 1 first question 5

The question is simple, such as the students' total scores for each learning purpose summarized below:

Select student number, subject number and total number (score)

Subtable name

Group by student number and subject number

I hope I can help you.