MySQL Forums
Forum List  »  PHP

Check Columns and SUM with values ​​from another.
Posted by: Elizandro Oliveira
Date: January 17, 2019 12:50PM

Hi,

I have 10 columns of defect names, and 10 columns of quantity of each defect,

D1 = Defect

Q1 = Number of defects D1

D2 = Defect

Q2 = Number of defects D2

and so on;



D1 may contain the initials C1, C2, C3, C4 through C40

D2 may contain the initials C1, C2, C3, C4 through C40

D3 may contain the initials C1, C2, C3, C4 through C40

and so on


See the attached image;

imgur . com/CBHYgVE



I need to check the columns and add up all the defects of each type, ranking the 3 largest defects, as in the attached image.



You can give me some help with this.

Options: ReplyQuote


Subject
Written By
Posted
Check Columns and SUM with values ​​from another.
January 17, 2019 12:50PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.