The latter, I'll try and give you a quick overview. I have 2 tables - one for [answers], one for [questions]. [answers] may have 3 entries for question 1, 5 for question 2, 10 for question 3.

I need to know the highest number of answers - in this case it is 10. But say I am only asking question 1 & 2 - I only need the maximum from those 2 questions, which is 5.

So I need a query to tell me the maximum number of answers for a specific set of questions (1 & 2 in the example above above). The possible range is a list of numbers in an array.





A separate question also - how do I modify the working query I posted to check 2 different tables, with effectively the same structure. (One has additional fields, but these are not mentioned in the query).