I have three tables that I need data from based on the maximum bid amount from the bids table for each item found in the auctions table. I can't get my query to only return the winning bidder. It keeps returning everyone who bid on each item.
select a.name, max(b.bid), e.first_name, e.last_name
from auctions a
inner join bids b on b.auction_id = a.id
inner join employees e on e.employee_id = b.employee_id
where b.submitted > '2011-09-20'
group by a.name, e.first_name, e.last_name