![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi -- I need to find the highest and lowest entries in a field, and calculate the difference. Can I do this with one query (mysql 4.0.2)? I'm just getting back into php/mysql after a year's absence, so I'm sorry if this is a basic question. I'm sure something simple is escaping me -- and will come to me as soon as this hits the server. Googled into the wee hours with no success. Thanks for any help -- Blue |
#3
| |||
| |||
|
|
BlueBrooke wrote: Hi -- I need to find the highest and lowest entries in a field, and calculate the difference. Can I do this with one query (mysql 4.0.2)? I'm just getting back into php/mysql after a year's absence, so I'm sorry if this is a basic question. I'm sure something simple is escaping me -- and will come to me as soon as this hits the server. Googled into the wee hours with no success. Thanks for any help -- Blue so what have you got so far? SELECT max( fieldname ) - min( fieldname ) FROM table |
![]() |
| Thread Tools | |
| Display Modes | |
| |