We are trying to convert rows into columns in order to display in row wise count.
Given a survey_details table, which look like
Given a vehicle_category table, which look like
how i can convert rows into columns in order to get count
the output which i am trying to get is
we have tried join on this table but unable to convert rows into column heading
select s.date,s.vehicle_id,v.category_name,count(s.vehicle_id) as vehicle_count from survey_details s inner join vehicle_category v on s.vehicle_id=v.vehicle_id group by s.vehicle_id;