Hi I have two Tables which i want to query from:
The first one is called bugs
and has columns:
bg_id , bg_project , bg_reported_date
The second one is called Projects
and has columns:
pj_id , pj_name , pj_parent_id
The bg_project
of bugs
represents the pj_id
of the Projects
.
I want to count how many bg_id i had in a single month for every parent project.
What would the query should be to get results that would look like: ProjectParentName , Count
A parent project can't have another parent project.
If a project is a parent project then it will have the same pj_id as the pj_parent_id.
Here's an example:
pj_id pj_name pj_parent_id
1 Parent1 1
2 Child1 1
Thanks in advance