Skip to content
Advertisement

get sum of all rows with id from main query

Screenshot of the problem

I need the sum of all positions from one year for every customer. In the subquery i’ve hardcoded the customernumber (mark 1) but it needs to be another customernumber for every row. The values in mark 2 are wrong.

Thanks for your help!

Advertisement

Answer

If BAS_Customers and BAS_Contacts have a one-to-one relationship, then you should be able to use something like this:

Answering your follow up question in the comments:

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement