I have a segmented line (road) dataset and I want to get the number of times each road is segmented.
In SQL it's just
SELECT RoadMntnc, count(RoadMntnc) AS count FROM clip_DSC_Roads GROUP BY RoadMntnc
How do I do the same in field calculator?
I assume it would be something like
aggregate(count("RoadMntnc"), group_by="RoadMntnc") but this doesn't work.