mysql - How to group table rows based on hash present in table column -


i using ahoy gem in rails application analytics data present in ahoy_events table want group rows based on id present in hash of properties column.

table looks https://s10.postimg.org/j9e5ylvuh/data_table.png

have tried query ahoy::event.group("properties regexp '[{,]\"id\"[,}]' ") returns first row.i know syntax correct unable find getting wrong.have search lot , tried different combination permutations of queries not find correct one.any suggesstions great help.


Comments