I have a table in the below format:
Reproduce code:
CREATE TEMP TABLE reasons
(
Reasons INT ,
Counts_students VARCHAR(50) ,
total_count int
);
INSERT INTO reasons
VALUES ( 'A',2,null),
( 'B',3,null),
('C',8,null),
('D',1,null),
('E',2,null),
('F',5,null),
(NULL,NULL,45)
The final output introduces a new row in the "Reasons" category as "rest", which is essentially the total across the total_count- count_students
Any help is truly appreciated! Thank you.

