문제
MYSQL
내가 작성한 정답 - substring, substr 모두 사용가능
SELECT substring(product_code,1,2) category, count(product_id) products
from product
group by 1
order by 1 ascSELECT substr(product_code,1,2) category, count(product_id) products
from product
group by 1
order by 1 ascORACLE
내가 작성한 정답
SELECT substr(product_code,1,2) category, count(product_id) products
from product
group by substr(product_code,1,2)
order by categorySUBSTR(string, start_position, length)
Share article