I am using ahoy gem in rails application to get the analytics data which is present in ahoy_events table i want to group the rows based on the id present in hash of properties column.
Table looks like this https://s10.postimg.org/j9e5ylvuh/data_table.png
Have tried query like Ahoy::Event.group("properties REGEXP '[{,]\"id\"[,}]' ") this returns only the first row.I know the syntax is correct but i am unable to find where i am getting wrong.Have search it a lot and tried different combination permutations of queries but could not find the correct one.Any suggesstions will be a great help.