-2

I have the following Table:

+----+--------------+-------+--------+---------+----------+------------+-------+ | ID | Admission_No | Class | Stream | Subject | Term | Test | Marks | +----+--------------+-------+--------+---------+----------+------------+-------+ | 1 | KBA-2022-003 | 6 | 10 | 6 | Term One | Test One | 94 | | 2 | KBA-2022-003 | 6 | 10 | 6 | Term One | Test Two | 88 | | 3 | KBA-2022-003 | 6 | 10 | 6 | Term One | Test Three | 78 | +----+--------------+-------+--------+---------+----------+------------+-------+

I would like a query that will give the the following result:

+--------------+-------+--------+---------+----------+----------+----------+------------+-------+ | Admission_No | Class | Stream | Subject | Term | Test One | Test Two | Test Three | Total | +--------------+-------+--------+---------+----------+----------+----------+------------+-------+ | KBA-2022-003 | 6 | 10 | 6 | Term One | 94 | 88 | 78 | 260 | +--------------+-------+--------+---------+----------+----------+----------+------------+-------+

Would someone direct me on how to go about it. However hard I try figuring the correct syntax that gives me the above result, I end up with errors.

Kamweti C
  • 3
  • 5

0 Answers0