which has mass:
the is the density of water which is .
The work done to lift this to a height of above the brim of the tank is:
that is the mass times g times the height lifted; as this is the change in potential energy of the water.
So the total work to empty the tank is:
(where we take .)