m: "Robert L. Yelvington" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Subject: need SQL assistance with a few selects
Date: Fri, 3 May 2002 09:24:02 -0500
Greetings folks,
I am able to do all this by pulling out data with PHP or PERL...just need
some straight MySQL comma
[snip]
2. The date of max disksize and the date of min disksize...in one query...if
that's possible.
[/snip]
mysql> select RunDate,
-> MAX(IF(ClientName = 'ABC INC', DiskSize, '')) AS ABC,
-> MAX(IF(ClientName = 'Eat at Joe', DiskSize, '')) AS Joe,
-> MAX(IF(ClientName = 'The Hop', Di
[snip]
1. An average disksize for each client, date doesn't matter.
The result I'd like to see would be something like:
"ABC INC","1.8"
"Joe's Restaurant","1.2"
[/snip]
mysql> SELECT CLIENT_NAME, AVG(DISK_SIZE) AS Average, MIN(DISK_SIZE) AS
Minimum, MAX(DISK_SIZE) AS Maximum
-> from table <--
Greetings folks,
I am able to do all this by pulling out data with PHP or PERL...just need
some straight MySQL command line advise
Specifically, I need some assistance with the following:
Here's my table's structure (table name is 'table'):
ID, CLIENT_NAME, CLIENT_LOGIN, DISK_SIZE, RUNTIME