Or did you?
One of the projects I’m working on is running on Azure VM’s with auto shutdown enabled. This means that if I’m not quick enough, the VM closes down with everything in it. Including that very intelligent query that took me hours to build but failed to save.
You’ve been there, we’ve all been there.
But, the query isn’t exactly lost. Because every query window is saved in a special folder. Usually you’ll be prompted by SSMS that there are unsaved query’s. In my case with 18.8, it doesn’t.
Where can you find your lost query’s?

Los
In this folder on your machine, the auto recover files are saved.
If you’re missing the Visual Studio 2017 folder, the files might live in the Visual Studio 2019 folder with the appropriate subfolders. But main thing is, you won’t lose your files quickly.
On the other hand, if you login with the credentials of someone else, it is possible to see what they were up to…
Thanks for reading!