Okay
  Public Ticket #2845789
Total not working with group by
Closed

Comments

  • Tan started the conversation

    The calculation for total of a column was not working correctly when SQL source contain group by. You may refer to attachment for my sql script and the generated output.

    Thank You,

    YY

  • [deleted] replied

    Hi Tan,

    thank you for reaching out to ussmile.png

    If the wp_ source (SQL ID) matches, please provide me a temporary WP-admin login for your site where this happens, so we could log in and take a look ‘from the inside’ as that’s the most efficient way to see and resolve the issue. We do not interfere with any data or anything else except for the plugin (in case that’s a production version of the site), and of course we do not provide login data to third party. You can write credentials here just make sure to mark the reply as PRIVATE so that nobody can see it except us.

  •   Tan replied privately
  • [deleted] replied

    Hi Tan!

    Thank you so muchsmile.png 

    I tested several options however, none with satisfactory results - it still sums only the value of the row where id is 1 as it grouped per id. My senior colleague would like to check out this case, so I have forwarded it to him. He will contact you as soon as possible.

  • Tan replied

    Hi Ivana,

    I've figured out the solution by constructing MySQL view using join and group by statement. The calculation is working fine now.

    Cheers!

  • [deleted] replied

    Hi Tan,

    thank you for letting me know that you've found a solutionsmile.png

    If you have any further questions or issues, please feel free to open a new ticket, and we'll gladly help.