Sql query to get the first and the last time + autobrand

  • Hello everyone!
    I have a query inside my attachment file 
    But it depicts only a part of my issue...
    I try to get info about the first and the last date of every departure
    of every driver and also info about the auto he used
    Please, help me to write the query I need...

  • May be 

    But Imnt sure

    strSQL = "SELECT [Drivers$].DriverID, MIN([CarList$].CarListDate), MAX([CarList$].CarListDate), [CarList$].CarId, [CarBrand$].CarBrandName " _& "FROM ((([Drivers$]" _& "inner JOIN [CarList$] ON [Drivers$].DriverID = [CarList$].DriverID)" _& "inner JOIN [Cars$] ON [CarList$].CarId = [Cars$].CarId) left JOIN [CarBrand$] ON [Cars$].CarBrandId = [CarBrand$].CarBrandId) " _& " Group BY [Drivers$].DriverID, [CarList$].CarId, [CarBrand$].CarBrandName "


  • Just a few observations:
    Your attachment does not contain a query.
    Your attachment contains macros, which may be a virus.
    Your attachment contains links to external objects.
    You need to post DML and DDL if you really want assistance, ignoring the fact this looks a lot like homework or an assignment as it looks awfully like your previous post.


  • This was removed by the editor as SPAM

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply