To query related child records in a lookup or master-detail relationship: * Use the parent object (Gym__c) to retrieve its child records (Trainer__c) through a nested query. * The child relationship name (Trainers__r) is derived from the lookup field.