Sum with group by (with case statement) in MySQL query
I am facing one issue in my following Mysql query. I have a table with columns id, pid, state, price1, discount, tot4 and tech1. I try to get a group by sum where pid is same and state value is…