How to: Querying Events
Ahoy provides a few methods on the event model to make querying easier.

To query on both name and properties, you can use:

```ruby
Ahoy::Event.where_event("Viewed product", product_id: 123).count
```

Or just query properties with:

```ruby
Ahoy::Event.where_props(product_id: 123, category: "Books").count
```

Group by properties with:

```ruby
Ahoy::Event.group_prop(:product_id, :category).count
```

Note: MySQL and MariaDB always return string keys (including `"null"` for `nil`) for `group_prop`.