There Must Be A Simpler Way Of Doing This?!
Jun 13, 2005I need help to design a query that is more efficient than the method I am currenlty using. I have a database containing information about bookings on holiday parks and I had devised the following query:
SELECT Bookinfx.Key, Bookinfx.[Park Name], Bookinfx.[Start Date], Bookinfx.[Start Date]
FROM Bookinfx
WHERE (((Bookinfx.[Park Name])="COTSWOLD") AND ((Bookinfx.[Start Date])>=#1/1/2004# And (Bookinfx.[Start Date])<=#1/31/2004#));
Now this was fine, but I started getting asked to do several queries with different parks and different dates and changing these parameters manually in the code is beginning to become a pretty labourious task! :(
What I would really like (if its possible? :confused: ) is a query that gives me a count of the number of bookings for each park (there are 7 in total) for each month, e.g.
Park: COTSWOLD
Jan 123 bookings
Feb 338 bookings
etc
I know there is a Count function available to use, but I'm not sure how I could get it to do this. Also, I would like to add criteria, (for example where nights <3).
Any suggestions/help most gratefully received!