Multi query with group by , join them in different columns
For MySQL 8+:

WITH RECURSIVE
cte1 AS ( SELECT customername, ROW_NUMBER() OVER () rn
          FROM tablegroup
          GROUP BY customername 
        ),
cte2 AS ( SELECT amazonnumber, ROW_NUMBER() OVER () rn 
          FROM tablegroup
          GROUP BY amazonnumber 
        ),
cte3 AS ( SELECT 1 num
          UNION ALL
          SELECT num+1 
          FROM cte3
          WHERE num &lt; ( SELECT GREATEST(cnt1, cnt2)
                        FROM ( SELECT COUNT(*) cnt1
                               FROM cte1
                             ),
                             ( SELECT COUNT(*) cnt2
                               FROM cte2
                             )
                      )
        )
SELECT cte1.customername, cte2.amazonnumber
FROM cte3
LEFT JOIN cte1 ON cte3.num = cte1.rn
LEFT JOIN cte2 ON cte3.num = cte2.rn