MySQL Forums
Forum List  »  Newbie

How to find number 1 from last id from columns qA01_1 up to qA30_5
Posted by: Zdeněk Havlíček
Date: March 07, 2017 03:35PM

Hello,
I have table "adults" with columns from qA01_1 up to qA30_5 (150 columns). Randomly each of columns could have values 0 or 1 or 5. And I need to find all columns which have value 1 from last record (id) . After I need to do SUM from columns contain value 1. Can you help me please ?

Options: ReplyQuote


Subject
Written By
Posted
How to find number 1 from last id from columns qA01_1 up to qA30_5
March 07, 2017 03:35PM


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.