We have the query which is given below and the output is as follows:
mysql> select count(1) as cnt ,card.Program_ID program_id ,fd.load_type load_type ,
Use
CASE WHEN
statements
References -
Similar Question - SQL query to pivot a column using CASE WHEN
http://www.sqlshare.com/pivot-using-the-case-statement_524.aspx (video)