Length of chain hanging from the table = L/4
Mass of chain (only the hanging part) = m/4
Gravitation force on hanging part of the chain = mg/4
Center of mass of the hanging part of the chain is at L/8 from end.( i.e, half of hanging lenght)
therefore, Work done = F.s
= mg/4 * L/8 cos180(degrees)
=-mgL/32
Hence, external work done required to pull the hanging length of the chain =1/32mgL