mysql group by substring
===

I have a field with text like "/site/index?sid=18&sub=321333&tid=site.net&ukey=1234543254"
How i can group it by part of string( 'sid' url param e.g.)?
And params may be in a different order.(sid on the end of line and etc.)