Is there a way to form a query that would take this:
Id | action | object
-------------
1 | view | article1
2 | view | article2
3 | view | article1
4 | order | article1
5 | order | article1
6 | order | article3
and produce this:
name | views | orders
----------------------
article1 | 2 | 2
article2 | 1 | 0
article3 | 0 | 1
One solution would be using two selects and join them afterwards in the code. Is there a better one?
regards && tia
noircc
Maybe something like this: