It is sometimes good at building SQL code examples, but almost always needs fine-tuning since it doesn’t know the schema specifics.
Having said that one time it gave me code that resulted in an error, then I went back to GPT and said “This code you gave me is giving this error, can you fix it?” and all it would do is say something like “Correct, that code is wrong and will give an error.”
It’s likely that HIS credentials were revoked, but anyone in IT will tell you there many systems which are accessed by a shared direct username/password login, and yes while that should be changed when needed a much easier solution would be to lock those apps/sites behind a VPN which is much easier to revoke access to.