You didn't say PROPERLY, you said you have to train for years to use a gun. Most of the people shooting people aren't trained, they're dipshyts with extendos holding the gun sideways and spraying. 99% of the stories you read aren't some kid in a weaver stance accurately picking off their target. Think of how many stories you read about small children accidentally shooting people. And glocks don't have safeties.Would you bet your life against a knife attacker that's 10ft away running at you full speed?
To PROPERLY operate Guns you need to know how to aim, how to drop a mag, fill a mag, reload, chamber a round, how operate the safety, how clean and maintain it. And despite all that, the target still might not die.
Give any Joe shmoe an AR and he can't operate it. Give him a knife and you'll be cut to pieces.