What Am I doing wrong? Here is my select statement. I want the highest WO# by EQ with ir's correswponding meter. I jsut want to receive one entry by EQM.
select
ltrim( rtrim(equipment)) "eqm",
max(wonumber) "WONUMBER",
meterpos
from
emwork
where svcid ='Repair'
group by ltrim( rtrim(equipment)) ,max(wonumber), meterpos
My current Results are:
EQ WO# Meter
------- ------ ------
AIR 015 9 5
AIR 015 15 11
AIR 015 35 3
BLD001 11 70
BLD001 22 83
BLD 001 51 150
REsult Desired
EQ WO# Meter
------- ------ ------
BLD 001 51 150
AIR 015 35 3
Start Free Trial