pivot in mysql queries

后端 未结 1 1523
暖寄归人
暖寄归人 2021-01-24 01:44

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 ,
             


        
1条回答
  •  抹茶落季
    2021-01-24 02:13

    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)

    0 讨论(0)
提交回复
热议问题