I have two tables for a monitoring database. The SURVEY table has fields [Survey_ID(PK), Site_ID, Date_Survey] and RESULTS table has [Surver_ID(FK,PK), Species(PK), Abundance]. (survey_id and species are the PK as a single species should not be recorded more than once per survey as it should have been summed up at the end of the survey.).
I have a query to give me the season and year, as the query I am working on I need to show how many sites a species occurs in, within each season of a particular year. (i.e. in winter 2012 magpies occured across 2 sites).
In the query I have Season and Survey_Year (from the query mentioned above), with criteria set to the specific month and year respectively. I then have Species and now need to add an expression field to calculate how many sites this species comes across. I tried a few ways but kept getting aggregate errors coming from the Season and Survey_Year fields.
Any pointers how to go about this would be great.
Thanks, Liam