I need below output with data below.
Net Total is column total,then Pending is coming from table and Grand Total (Pending+Net Total)
Create table #tbl_Account_L_Four (Level_Four_ID int,Level_Four_Name varchar(50))
CREATE TABLE #tbl_Invoice(ID INT,Level_Four_ID int,qty int,Rate int,Pending INT,Inv_date date);
Insert into #tbl_Account_L_Four values
(1001,'akhter'),
(1002,'Ali')
INSERT INTO #tbl_Invoice VALUES
(1,1001,2,10,0,'01-04-2021')
, (2,1001,15,2,25,'01-04-2021')
, (3,1002,40,120,0,'01-04-2021')

