Make a new column based from CASE and GROUP BY result
问题 I have table like this called, table test : +------------------------+--------+ | id_laporan_rekomendasi | status | +------------------------+--------+ | 1 | 2 | | 1 | 2 | | 1 | 2 | | 1 | 3 | | 2 | 2 | | 2 | 2 | | 2 | 2 | | 2 | 3 | | 3 | 2 | | 3 | 3 | | 4 | 2 | | 5 | 2 | | 5 | 3 | | 6 | 2 | +------------------------+--------+ I want to group by id_laporan_rekomendasi and make a new column when in column status there is value 3 . so if there is no value 3 in column status, then the value would