SELECT
substring_index(order_id,'_',-1) AS product_id, #分割出来下划线后的字符串
count(*) AS cnt
FROM order_log
GROUP BY substring_index(order_id,'_',-1);

SELECT
substring_index(order_id,'_',-1) AS product_id, #分割出来下划线后的字符串
count(*) AS cnt
FROM order_log
GROUP BY substring_index(order_id,'_',-1);