Battery dies only when I try to start the car

Thank you for your help. Your “faulty wiring” idea led me to examine the actual wire connected to the terminal. It looks like part of the starter wire is exposed and corroded just a little bit past the lead connecting to the terminal. Do you think that could be causing the problem?