Group json data in db using a query
If the content of the properties column is like in your screenshot, it's easy to remove everything from the content except for the pure number IDs:

SELECT REPLACE(REPLACE(properties, '{"listing_id":', ''), '}', '') AS listing,
       *
FROM   ahoy_events;


This will give you the pure numbers from your json column as (new) column listing.

| listing | id | visit_id | ... | properties        |
|---------------------------------------------------|
| 27      | 57 | 2        | ... | {"listing_id":27} |
| 23      | 58 | 2        | ... | {"listing_id":23} |


You can then group by this value.

Was this what you were asking for?