LyndonOHRC
Programmer
I have a table of horse birth records. One column has the DOBN number (Birth Mother ID), and another has the BYR (birth year).
We need to know some stats about multiple births. I need to know, by birth year, how many dams had two foals, how many had 3...
Output:
Year foalQty, MareCount
2007 2 37
2007 3 19
...
So, in 2007 37 dams had two babies, 19 dams had 3 babies...
What I have so far, this gives me the foal count for each mare, this is where I'm stuck:
Any help much appreciated...
Lyndon
We need to know some stats about multiple births. I need to know, by birth year, how many dams had two foals, how many had 3...
Output:
Year foalQty, MareCount
2007 2 37
2007 3 19
...
So, in 2007 37 dams had two babies, 19 dams had 3 babies...
What I have so far, this gives me the foal count for each mare, this is where I'm stuck:
Code:
Select distinct dobn, count(dobn)as foalCount, byr
From form100
Where byr>='2007' and breed='2'
Group by dobn, byr
Order by dobn, byr
Lyndon