Generate a MySQL SELECT query that retrieves work order details from a CMMS system using the provided table structure. Remember to join the Master and Detail tables using the appropriate foreign key.