0

data_table

col_1   col_2   col_3   col_4 
car     train   plane   book    
bike    pen     car     Null    
tempo   train   car     laptop  
Null    train   tempo   book   

expected output

distinct_value count_col_1 count_col_2 count_col_3 count_col_4    
car             1          0           2           0    
bike            1          0           0           0
tempo           1          0           1           0 
train           0          3           0           0  
plane           0          0           1           0
laptop          0          0           0           1
book            0          0           0           2
pen             0          1           0           0 

Can anyone help ?

amdixon
  • 3,814
  • 8
  • 25
  • 34
  • What *programming* question are you asking? You have to atleast try to come up with something yourself before we can say what is potentially wrong with it. – StarShine Sep 21 '15 at 13:19
  • I can say what's wrong with it. This data structure is all wrong. I can't see any case when you're justified to use something like this, especially when you want to retrieve something like this result. – Derenir Sep 21 '15 at 14:18
  • its simple mysql table with output. – user3074158 Sep 24 '15 at 05:43

0 Answers0