Hi I have a fairly complex query on a database - complex for me anyhow. <BR><BR>I have set up a poll database with various tables.<BR><BR>Here is my dillema...<BR>Table #1 is Programs (1 to many link)<BR>Table #2 holds questions linked to the programs:<BR><BR>Did you see program (ID #1)<BR>How would you rate it out of 10 (Drop down from 1 -10)<BR>etc ...<BR><BR>What I am trying to to is to get an average score for each program based on a start and finish date.<BR><BR>Problem is that using a "group by" function has to inlclude all tables used in the select part of the query. I am ending up with a seperate group for each date instead of an overall of the between dates.<BR><BR>Query ...<BR><BR>MySQL = " SELECT Programmes.prgName, Avg(ProgrammesWatched.prwScore) AS AvgOfprwScore, Programmes.prgType, Programmes.prgSlot " &_ <BR>"FROM Programmes INNER JOIN ProgrammesWatched ON Programmes.KEYIDprg = ProgrammesWatched.FKEYIDprg " &_ <BR>"GROUP BY Programmes.prgName, Programmes.prgType, Programmes.prgSlot, ProgrammesWatched.prwDateStamp " &_ <BR>"HAVING (((Programmes.prgType)=&#039Promo&#039) AND ((ProgrammesWatched.prwDateStamp)"&_<BR>"Between #" & session("DateStart") & "# And #" & session("DateFinish") & "#)) " &_ <BR>"ORDER BY Avg(ProgrammesWatched.prwScore) DESC; " <BR><BR><BR>Any Ideas or other possible avenues ?<BR><BR>Thanks<BR><BR>Dwane