I have such table
id p_id number
1 1 12
2 1 13
3 2 14
4 2 15
How to get such items in my view, i mean group by p_id and get number values from the group
for p_id 1 returns count 2 and 12,13
for p_id 2 returns count 2 and 14,15