how to display sumproduct based on the study in this case?
Does anyone know how to use having clause after group by in sequelize orm?
Anybody can help me in this?
somebody could help me?
Which version MySQL is installed?
Are you not getting output ?
?!!???!!!!?!!??!???!??
?!!???!!!!?!!??!???!??
It’s MsSQL, not MySQL
oh .. should’ve know that
sorry
but I still need help
sorry
but I still need help
https://t.me/mssqldba ask here

good morninga all, I have a problem to solve. how to display sumproduct based on the study in this case? like in excel
Plz share
Better to ask this question in a NodeJS group
No worries , i got it resolved.Thanks

I have forget the password. Anybody can help me in this?
Already i have searched on youtube but i am not getting proper solution for this
(
id int primary key identity(1,1),
Code int Unique,
Points int
)
–insert into Total_Points values(1001,10)
–insert into Total_Points values(2001,20)
–insert into Total_Points values(3001,30)
–insert into Total_Points values(4001,40)
–insert into Total_Points values(5001,50)
–select * from Total_Points
–select * from Points_TRN
–create table Points_TRN
–(
–id int primary key identity(1,1),
–RefCode int ,
–EarnPoints int
–)
–insert into Points_TRN values(1001,1)
–insert into Points_TRN values(1001,2)
–insert into Points_TRN values(1001,3)
–insert into Points_TRN values(2001,2)
–insert into Points_TRN values(2001,2)
–insert into Points_TRN values(2001,2)
–insert into Points_TRN values(3001,7)
–insert into Points_TRN values(3001,5)
–insert into Points_TRN values(3001,4)
–Expected Output
— id Code Totalpoint Earnpoint FinalPoint
1 1001 10 6 4
2 2001 20 6 14
3 3001 30 16 14
4 4001 40 0 0
5 5001 50 0 0
(
id int primary key identity(1,1),
Code int Unique,
Points int
)
–insert into Total_Points values(1001,10)
–insert into Total_Points values(2001,20)
–insert into Total_Points values(3001,30)
–insert into Total_Points values(4001,40)
–insert into Total_Points values(5001,50)
–select * from Total_Points
–select * from Points_TRN
–create table Points_TRN
–(
–id int primary key identity(1,1),
–RefCode int ,
–EarnPoints int
–)
–insert into Points_TRN values(1001,1)
–insert into Points_TRN values(1001,2)
–insert into Points_TRN values(1001,3)
–insert into Points_TRN values(2001,2)
–insert into Points_TRN values(2001,2)
–insert into Points_TRN values(2001,2)
–insert into Points_TRN values(3001,7)
–insert into Points_TRN values(3001,5)
–insert into Points_TRN values(3001,4)
–Expected Output
— id Code Totalpoint Earnpoint FinalPoint
1 1001 10 6 4
2 2001 20 6 14
3 3001 30 16 14
4 4001 40 0 0
5 5001 50 0 0
SELECT a.id,
a.Code,
a.Points,
coalesce(sum(b.EarnPoints),0) as Earnpoint,
coalesce(a.Points – sum(b.EarnPoints),0) as FinalPoint
FROM Total_Points a
LEFT JOIN Points_TRN b on a.Code = b.RefCode
GROUP BY 1,2,3
I am looking for courses that will give me a certificate in mysql. somebody could help me?
Which version MySQL is installed?
https://dev.mysql.com/doc/mysql-windows-excerpt/5.7/en/resetting-permissions-windows.html
a.Code,
a.Points,
coalesce(sum(b.EarnPoints),0) as Earnpoint,
coalesce(a.Points – sum(b.EarnPoints),0) as FinalPoint
FROM Total_Points a
LEFT JOIN Points_TRN b on a.Code = b.RefCode
GROUP BY 1,2,3
check my expected output
a.Code,
a.Points,
coalesce(sum(b.EarnPoints),0) as Earnpoint,
coalesce(a.Points – sum(b.EarnPoints),0) as FinalPoint
FROM Total_Points a
LEFT JOIN Points_TRN b on a.Code = b.RefCode
GROUP BY 1,2,3
–Expected Output
— id Code Totalpoint Earnpoint FinalPoint
1 1001 10 6 4
2 2001 20 6 14
3 3001 30 16 14
4 4001 40 0 0
5 5001 50 0 0
— id Code Totalpoint Earnpoint FinalPoint
1 1001 10 6 4
2 2001 20 6 14
3 3001 30 16 14
4 4001 40 0 0
5 5001 50 0 0
Thats what i got using the query i had send
I have reinstalled it.
Thanks for response
which support?
Msg
I just msgd you
Thanks for response
Ok