I have a table with 4 columns (product_image_id, product_id, image, sort_order) some of the rows are having the same product_id value but with different image values, I need to move the values from image column that have duplicate product_ids to new columns called image2, image3, image4, image5.
Any help is greatly appreciated.