From: Benjamin Stillman Date: September 13 2012 2:08pm Subject: RE: query help List-Archive: http://lists.mysql.com/mysql/228164 Message-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable I think this will get you there: SELECT LEAD, COUNT(*) FROM ORDERS GROUP BY LEAD; It'll give you something more like: | LEAD | COUNT(*) | | F | 44 | | S | 122 | | R | 32 | -----Original Message----- From: Richard Reina [mailto:gatorreina@stripped] Sent: Thursday, September 13, 2012 9:51 AM To: mysql@stripped Subject: query help I have a table like this: |ORDERS| |ID | DATE | QNT | LEAD | |342 | 8-12-12 | 32 | F | |345 | 8-15-12 | 12 | S | |349 | 8-16-12 | 9 | R | I am looking for a way to query it with counts by the LEAD column in order = to tell what the number of each type lead is, so that I get something like = this: F_LEADS S_LEADS R_LEADS 44 122 32 Is this possible? If so can anyone help with syntax? Thanks, Richard -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql ________________________________ Notice: This communication may contain privileged and/or confidential infor= mation. If you are not the intended recipient, please notify the sender by = email, and immediately delete the message and any attachments without copyi= ng or disclosing them. LBI may, for any reason, intercept, access, use, and= disclose any information that is communicated by or through, or which is s= tored on, its networks, applications, services, and devices.