select month(booking_date) bookings_month, count(bookings) as bookings
GROUP BY month(booking_date)

Peter

> -----Original Message-----
> From: shaun thornburgh [mailto:[EMAIL PROTECTED]
> Sent: 10 June 2004 11:12
> To: [EMAIL PROTECTED]
> Subject: A query that groups information by month
> 
> 
> Hi,
> 
> I have a table that holds information on bookings for a 
> scheduling system. 
> Is it possible to produce a report that lists total bookings data 
> by month 
> with one query
> 
> i.e.
> 
> Jan  Feb  Mar  Apr  May  Jun  Jul
> 6     7     3     9      2     4     3
> 
> Thanks for you help
> 
> _________________________________________________________________
> Stay in touch with absent friends - get MSN Messenger 
> http://www.msn.co.uk/messenger
> 
> 
> -- 
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]
> 
> 
> Email has been scanned  for viruses and SPAM by Trader Mailmanager 
> www.trader.uk.com
> 
> 
> 
> 


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to