This tutorial will walk you through how to create a stored procedure in Microsoft SQL server and build an example through a query in your window. Very easy way to do this.
GitHub Script:
https://github.com/ProfessorPitch/ProfessorPitch/blob/master/SQL/Stored%20Procedure%20Example.sql