If aldehyde and ketone both are present in a molecule, the priority is decided by the aldehyde group.
Aldehydes and ketones both contain the carbonyl group.