I have two tables that are relevant to the query I would like to perform. The important information in each is as follows:
Equipment_TBL: with several fields but the only one of importance is the primary key - Equipment_ID
Maintenance_Record_TBL: with fields Maintenance_Record_ID (Primary key), Equipment_ID (forgein key), Overhaul_Date (date field) and other fields that are not of importance to this query.
Every time a piece of equipment undergoes maintenance, a new maintenance record is created (in the Maintenance_Record_TBL). Therefore, there can be several maintenance records for each piece of equipment.
I would like a query to find the most recent overhaul_date for each piece of equipment_ID.
I’m not sure how to do this, so any help or direction would be greatly appreciated. I also have limited SQL knowledge, but I'm prepared to learn if need be.
Cheers in advance!
Equipment_TBL: with several fields but the only one of importance is the primary key - Equipment_ID
Maintenance_Record_TBL: with fields Maintenance_Record_ID (Primary key), Equipment_ID (forgein key), Overhaul_Date (date field) and other fields that are not of importance to this query.
Every time a piece of equipment undergoes maintenance, a new maintenance record is created (in the Maintenance_Record_TBL). Therefore, there can be several maintenance records for each piece of equipment.
I would like a query to find the most recent overhaul_date for each piece of equipment_ID.
I’m not sure how to do this, so any help or direction would be greatly appreciated. I also have limited SQL knowledge, but I'm prepared to learn if need be.
Cheers in advance!