The wire to the plug is at the bottom. The wire to the lamp body is at the top.
The ground and neutral joined together on the plug side, and the ground and miss coloured live on the other.
The case of the lamp is metal. The ground wire is bolted to the case at the top. Yes the case is live mains when this lamp is turned on.