retrieving maximum value from query

  • Thread starter Thread starter Kok Yong Lee
  • Start date Start date
K

Kok Yong Lee

hi there,

I have a table of the following schema

build
---------------------------
build_id AutoNumber
build_date Date/Time
label Text
CL Number
----------------------------

for a simple query like
SELECT build.CL FROM build;

how can I apply a filter so that I only get the max CL value?

thanks in advanced.
 
SELECT Max(CL) FROM build

If you want the details about the entry with the largest value, you could
try:

SELECT build_id, build_date, label, CL
FROM build
WHERE CL IN (Select Max(CL) FROM build)

Recognize, of course, that the second query might return multiple rows.
 
Back
Top