select regexp_substr(o.order_id,"[^_]+$") as product_id, count(*)
from order_log o 
group by product_id