This tutorial will walk you through how to restore a database through by running a SQL query. We are using a sample database.
Database Backup:
https://github.com/Microsoft/sql-server-samples/releases/tag/adventureworks
Restore DB SQL Script:
https://github.com/ProfessorPitch/ProfessorPitch/blob/master/SQL/Restore%20Database.sql