Originally posted by: Hyperblaze
SELECT max(Price) as maxPrice, min(Price) as minPrice
FROM Table1
(mind you, I have not tested this out, but it should work)
Originally posted by: Markbnj
Originally posted by: Hyperblaze
SELECT max(Price) as maxPrice, min(Price) as minPrice
FROM Table1
(mind you, I have not tested this out, but it should work)
I think it's actually...
SELECT maxPrice AS Max(Price), minPrice AS Min(Price) ... etc.
I considered suggesting this too, but it's hard to tell what it is the OP really needs to do. This query will get you the two numbers, but not the item names. For that the union query suggested by KLin is the way to go (but of course returns two rows, and who knows what the OP meant by "at the same time"), but I haven't quite figured out why the 'group by' is necessary.
As a general note to all young programmers, and even the not so young ones: we're in a technical business, and precision of language and description is not elective. I'm continually amazed by how vaguely people will describe programming challenges and problems when asking for help.
Originally posted by: Hyperblaze
Originally posted by: Markbnj
Originally posted by: Hyperblaze
SELECT max(Price) as maxPrice, min(Price) as minPrice
FROM Table1
(mind you, I have not tested this out, but it should work)
I think it's actually...
SELECT maxPrice AS Max(Price), minPrice AS Min(Price) ... etc.
I considered suggesting this too, but it's hard to tell what it is the OP really needs to do. This query will get you the two numbers, but not the item names. For that the union query suggested by KLin is the way to go (but of course returns two rows, and who knows what the OP meant by "at the same time"), but I haven't quite figured out why the 'group by' is necessary.
As a general note to all young programmers, and even the not so young ones: we're in a technical business, and precision of language and description is not elective. I'm continually amazed by how vaguely people will describe programming challenges and problems when asking for help.
If you type this....
SELECT maxPrice AS Max(Price), minPrice AS Min(Price) ... etc.
You'll be getting the maxPrice field labelled as "Max(Price)"
The way I have it, it finds the max price and min price and labells the field without any special characters