If the SSMS crashes / unsaved tab gets accidentally closed, you can check the following location for backup files
C:\Users\YOUR_USERNAME\Documents\Visual Studio 2015\Backup Files\Solution1
If you want to learn SQL then check out this SQL Training course that provides instructor-led training, certification, and also job assistance