Try this: select delivery, count(*) as ticketcount from ticketsales where delivery="post" or delivery="pickup" group by delivery
Andy > -----Original Message----- > From: Ville Mattila [mailto:[EMAIL PROTECTED] > Sent: 03 July 2003 11:28 > To: [EMAIL PROTECTED] > Subject: Counting question > > > Hi there, > > We are currently having a large festival here in Ikaalinen, Finland > (www.satahamesoi.fi) and we have our booking system based on MySQL. > > I should find out how many tickets are sold in each concert with different > delivery methods. How could I make a count like this: > SELECT COUNT(delivery='post') AS post, COUNT(delivery='pickup') AS > pickup... Or should I just make two separated queries? > > Thanks, > Ville > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: > http://lists.mysql.com/[EMAIL PROTECTED] > > -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]