My table like
---------------
trtm t_date id_no certno1 certno2 certno3 certno4 certno5 certno6 certno7 certno8 certno9 certno10
TM 15/02/2002 A12 2158
TM 15/02/2010 A13 8181 8182 8183 8184 8185 8186 8187 8188 8189 8190
TM 15/02/2010 A14 19138
-------------------
I Graf von id_no und certno aus 1 bis 10Wie man dorthin Zählung mehrerer Spalte sql
my query is
----------
select count(id_no) as total_id,count(CONCAT(certno1, certno2, certno3,certno4,certno5,certno6,certno7,certno8,certno9,certno10)) as certificate from table where trtm='TM'
----------
my output is:
---------
total_id certificate
3 3
-------------------------
nehmen müssen, aber ich muss die Anzahl der Bescheinigung, wo die Werte sind, gibt es 3 aber ich brauche, ist 12
------------
output needs:
-----------
total_id certificate
3 12
-------------
ich bin nur die Zählung in beiden total_id und certificate.so bekommen, bitte helfen Sie mir, wenn jemand weiß.
Siehe Normalisierung – Strawberry