Ok...this has me a little confused. The MySQL Manual (on group by) has the following to say;
-> FROM student
-> GROUP BY student_name;
Is this saying that both MIN() and MAX() have to be defined?
All I want/need to do is get the MAX() number held in the 'Weight' field It would really help now, and in future stuff if I could understand how this worked...as it looks like it could be as useful as the WHERE clause
Cheers in advance.
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote:
mysql> SELECT student_name, MIN(test_score), MAX(test_score) -> FROM student
-> GROUP BY student_name;
Is this saying that both MIN() and MAX() have to be defined?
All I want/need to do is get the MAX() number held in the 'Weight' field It would really help now, and in future stuff if I could understand how this worked...as it looks like it could be as useful as the WHERE clause
Cheers in advance.
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!