I have a table with object show/click statistics.
Table has such columns: id, objectId, pageUrl, event('show' or 'click').
For example:
id, objectId, pageUrl, event
1, 1, /cars/, show
2, 1, /cars/, show
3, 1, /items/, show
4, 2, /cars/, show
5, 2, /items/, show
Can I, in a simple way, get the count for each object having a unique pageUrl?
The result for dataset must be:
objectId, counter
1, 2
2, 2
For object with id 1 there are 3 records, but pageUrl /cars/ appears two times, so counter must be only for unique urls.