Нямате функция за агрегиране, така че трябва да използвате отделно, а не групиране по
SELECT distinct SUBSTRING(`page_url`,-3) as pid
from `prop_log`
order by pid
и ако имате нужда само от редовете с цифра
SELECT distinct SUBSTRING(`page_url`,-3) as pid
from `prop_log`
WHERE `page_url` REGEXP '[0-9]'
order by pid
и за брой редове
SELECT SUBSTRING(`page_url`,-3) as pid
from `prop_log`
WHERE `page_url` REGEXP '[0-9]'
group by SUBSTRING(`page_url`,-3)
order by count(*)