Hi Neil,

Check this documentation, I think you will have no trouble to adapt it to your 
code

http://dev.mysql.com/doc/refman/5.0/en/group-by-functions.html#function_min


--
Adrián Espinosa.
Engineering Support, Wholesale Systems.
Jazztel.com



-----Mensaje original-----
De: Neil Tompkins [mailto:neil.tompk...@googlemail.com]
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 
destinatario. Si usted ha recibido este mensaje por error, no debe revelar, 
copiar, distribuir o usarlo en ningún sentido. Le rogamos lo comunique al 
remitente y borre dicho mensaje y cualquier documento adjunto que pudiera 
contener. El correo electrónico via Internet no permite asegurar la 
confidencialidad de los mensajes que se transmiten ni su integridad o correcta 
recepción. JAZZTEL no asume responsabilidad por estas circunstancias. Si el 
destinatario de este mensaje no consintiera la utilización del correo 
electrónico via Internet y la grabación de los mensajes, rogamos lo ponga en 
nuestro conocimiento de forma inmediata.Cualquier opinión expresada en este 
mensaje pertenece únicamente al autor remitente, y no representa necesariamente 
la opinión de JAZZTEL, a no ser que expresamente se diga y el remitente esté 
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 disclose, 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 those 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 author, and do not 
necessarily represent those of JAZZTEL, unless otherwise specifically stated 
and the sender is authorised to do so.


--------------------------------------------------------------------------------

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

Reply via email to