Hello i am learning about declaring and using variables in HeidiSQL running the following script in do get the errormassage "invalid use of group function" how can i fill a variable to a sum function
USE `pv-anlage`;
SET @myvar= SUM(fusionsolardaten.netzbezug_kwh);
SELECT @myvar;
thx for helping