SQL help
| From: | SANIsoft | Date: | Mon, 24 Jul 2000 07:46:53 +0000 |
| Subject: | SQL help | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-7839@lists.php.net to get a copy of this message | ||
Hello Folks,
Slightly off topic BUT I am stuck
I have the following table
CREATE TABLE ticker_prices (
millID bigint(21) ,
grade char(3) ,
op double(11,2),
hi double(11,2) ,
lo double(11,2) ,
cl double(11,2) ,
t_time timestamp(14)
);
This is a table which contains Open High Low Close prices for a commodity
This commodity is manufactured in various grades by various mills (refered
by millID)
I want a single query which returns the latest Closing price for all the
mills in all the grades
have been trying various combination of max(t_time) alogn with GROUP BY
MillID, Grade
but nothing seems to work
Thanks in advance
Tarique
=====================================
B2B Application Service Providers
http://www.sanisoft.com
The Vortal for Nagpur http://nagpurcity.net
=====================================