

For aldol condensation, there is a requirement of a carbonyl group (-C=O). So both adehydes and ketones undergo aldol condensation. Howveer, the carbon atom involved in C=C formation should not be the one also involved in -C=O. This is because, one carbon atom cannot contain more than one double bond, otherwise it is unstable and cannot exist. So if the -C=O group is on a separate carbon atom in an alkene than the one involved in -C=C-, then it does undergo aldol condensation.
