try something like this:
select site_id, max(service_date), name from
site_service left join site on site.id =
site_service.site_id group by site_id;
--- Tom Beidler <[EMAIL PROTECTED]> wrote:
> I¹m having problems with a left join. I¹m not even
> sure if I should be using
> a left join.
>
>
I¹m having problems with a left join. I¹m not even sure if I should be using
a left join.
I have two tables; sites and site_service. Site_service contains service
dates for the sites. I¹m trying to write a query that will select each site
and the last service date for that site. A site may have ma