I did a little experiment, following Jon's code. I'm in the middle of producing a report which shows data input progress over the years and it occurred to me that it might be useful to display this in respect of those Taxon Groups (I've already got a similar one that works for named Surveys), so I adapted the above code in Access 2003 to come up with the following:
SELECT TOP 100 PERCENT YEAR(dbo.TAXON_OCCURRENCE.ENTRY_DATE) AS Year, dbo.TAXON_GROUP.TAXON_GROUP_NAME AS [Group],
COUNT(dbo.TAXON_GROUP.TAXON_GROUP_NAME) AS Numbers, dbo.TAXON_GROUP.SORT_ORDER
FROM dbo.SAMPLE INNER JOIN
dbo.TAXON_OCCURRENCE ON dbo.SAMPLE.SAMPLE_KEY = dbo.TAXON_OCCURRENCE.SAMPLE_KEY INNER JOIN
dbo.TAXON_DETERMINATION ON
dbo.TAXON_OCCURRENCE.TAXON_OCCURRENCE_KEY = dbo.TAXON_DETERMINATION.TAXON_OCCURRENCE_KEY INNER JOIN
dbo.TAXON_LIST_ITEM ON dbo.TAXON_DETERMINATION.TAXON_LIST_ITEM_KEY = dbo.TAXON_LIST_ITEM.TAXON_LIST_ITEM_KEY INNER JOIN
dbo.INDEX_TAXON_NAME ON
dbo.TAXON_LIST_ITEM.TAXON_LIST_ITEM_KEY = dbo.INDEX_TAXON_NAME.RECOMMENDED_TAXON_LIST_ITEM_KEY INNER JOIN
dbo.TAXON_VERSION ON dbo.TAXON_LIST_ITEM.TAXON_VERSION_KEY = dbo.TAXON_VERSION.TAXON_VERSION_KEY INNER JOIN
dbo.TAXON_GROUP ON dbo.TAXON_VERSION.OUTPUT_GROUP_KEY = dbo.TAXON_GROUP.TAXON_GROUP_KEY
GROUP BY dbo.TAXON_OCCURRENCE.CHECKED, YEAR(dbo.TAXON_OCCURRENCE.ENTRY_DATE), dbo.TAXON_GROUP.TAXON_GROUP_NAME,
dbo.TAXON_GROUP.SORT_ORDER
HAVING (dbo.TAXON_OCCURRENCE.CHECKED = 1)
ORDER BY YEAR(dbo.TAXON_OCCURRENCE.ENTRY_DATE), dbo.TAXON_GROUP.SORT_ORDER
This gives me a simple list sorted by year, then Taxon Group (sort order) plus the number of Taxon occurrences in each of those groups. Rearranged in a spreadsheet it makes for a nice presentation.
One puzzle though. I've come up with horrendously more harvestmen than spiders and I'm sure my database is the other way around - is it my coding or are they transposed in the Taxon_group table?