sum with group by filter value

If you're a new user of AppGini, feel free to ask general usage questions, or look for answers here.
Post Reply
onyr
Posts: 6
Joined: 2021-06-13 12:49

sum with group by filter value

Post by onyr » 2021-06-22 12:21

Hi,

I need to show only value for "Salted Water" product on "Provided" from table using sum with sql calculated fields.

My formula is:

SELECT SUM(`stockin`.`sti_qtty`)
FROM `site`
LEFT JOIN `stockin` ON `stockin`.`sti_sit_id`=`site`.`sit_id`
WHERE `site`.`sit_id`='%ID%'

But it's all sum for all products.

Where I can insert "Group By" and "Where" value is from my formula?

Regards
Attachments
Capture d’écran 2021-06-22 à 13.03.19.png
Capture d’écran 2021-06-22 à 13.03.19.png (46.35 KiB) Viewed 608 times
Capture d’écran 2021-06-22 à 13.03.57.png
Capture d’écran 2021-06-22 à 13.03.57.png (30.46 KiB) Viewed 608 times

Post Reply