Number of unmated breeding females by age

Top  Previous  Next

I would like a count of the number of unmated breeding females currently in my herd by age, that are at least 200 days of age:

 

The setup screen for Query report is shown below:

 

Tables:

FEMALEX

Columns:

ENTRYDATE (Group=Yes), ID (Function=Count)

Criteria:

STATUSCODE='E' AND CURRENT_DATE-ENTRYDATE>200

Sorting:

ENTRYDATE

 

Or you can use SQL directly:

 

SELECT ENTRYDATE, COUNT(*) AS NUMBER
FROM FEMALEEX
WHERE STATUSCODE='E'
AND CURRENT_DATE-ENTRYDATE>200
GROUP BY ENTRYDATE
ORDER BY ENTRYDATE

 

The Query report is shown below:

 

zoa-14