Aquí está mi consulta general sin MAX
SELECT "job_routing"."order-no", "job_routing"."work-ctr", "job_routing"."complete-date"
FROM "E940LIVE"."PUB"."job-routing" "job_routing"
WHERE "job_routing"."company"='01' AND "job_routing"."resource-group" LIKE 'E1%' AND "job_routing"."complete-date">{d '2008-11-11'}
Encontré algún código que es similar pero simplemente no lo entendí lo suficiente como para hacerlo funcionar para mí.
Esto es lo que encontré:
CREATE TABLE PersonalInfo
(
first_name VARCHAR(25) NOT NULL,
last_name VARCHAR(25) NOT NULL,
birth_date DATETIME NOT NULL,
address VARCHAR(25) NOT NULL,
city VARCHAR(25) NOT NULL,
state CHAR(2) NOT NULL,
country CHAR(2) NOT NULL,
PRIMARY KEY (last_name, first_name)
)
SELECT P.*
FROM (SELECT country, state, city, MIN(birth_date) AS birth_date
FROM PersonalInfo
GROUP BY country, state, city) AS O
INNER JOIN
PersonalInfo AS P
ON P.country = O.country AND
P.state = O.state AND
P.city = O.city AND
P.birth_date = O.birth_date
Gracias
Wayne