From: Adrian Espinosa Moreno Date: December 14 2012 9:48am Subject: RE: Get lowest value List-Archive: http://lists.mysql.com/mysql/228815 Message-Id: <0A05530EC8DF4244AAD8E4243ACCB24B263FAF9A50@EXI1PWM2.jazztel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi Neil, Check this documentation, I think you will have no trouble to adapt it to y= our code http://dev.mysql.com/doc/refman/5.0/en/group-by-functions.html#function_min -- Adri=E1n Espinosa. Engineering Support, Wholesale Systems. Jazztel.com -----Mensaje original----- De: Neil Tompkins [mailto:neil.tompkins@stripped] Enviado el: viernes, 14 de diciembre de 2012 10:28 Para: [MySQL] Asunto: Get lowest value Hi, I've the following data total, supplier_id, product_name, supplier_code 125,2,iPod,xyz123 100,1,iPod,abc123 145,3,iPod,1213113 245,4,iPod,12345 What query do I need to get the lowest total in this case 100 for supplier_= id 1 ? Thanks Neil ---------------------------------------------------------------------------= ----- Este mensaje es privado y CONFIDENCIAL y se dirige exclusivamente a su dest= inatario. Si usted ha recibido este mensaje por error, no debe revelar, cop= iar, distribuir o usarlo en ning=FAn sentido. Le rogamos lo comunique al re= mitente y borre dicho mensaje y cualquier documento adjunto que pudiera con= tener. El correo electr=F3nico via Internet no permite asegurar la confiden= cialidad de los mensajes que se transmiten ni su integridad o correcta rece= pci=F3n. JAZZTEL no asume responsabilidad por estas circunstancias. Si el d= estinatario de este mensaje no consintiera la utilizaci=F3n del correo elec= tr=F3nico via Internet y la grabaci=F3n de los mensajes, rogamos lo ponga e= n nuestro conocimiento de forma inmediata.Cualquier opini=F3n expresada en = este mensaje pertenece =FAnicamente al autor remitente, y no representa nec= esariamente la opini=F3n de JAZZTEL, a no ser que expresamente se diga y el= remitente est=E9 autorizado para hacerlo. ---------------------------------------------------------------------------= ----- This message is private and CONFIDENTIAL and it is intended exclusively for= its addressee. If you receive this message in error, you should not disclo= se, copy, distribute this e-mail or use it in any other way. Please inform = the sender and delete the message and attachments from your system.Internet= e-mail neither guarantees the confidentiality nor the integrity or proper = receipt of the messages sent. JAZZTEL does not assume any liability for tho= se circumstances. If the addressee of this message does not consent to the = use of Internet e-mail and message recording, please notify us immediately.= Any views or opinions contained in this message are solely those of the aut= hor, and do not necessarily represent those of JAZZTEL, unless otherwise sp= ecifically stated and the sender is authorised to do so. ---------------------------------------------------------------------------= -----