When you’re in a sqlite database, you can type .read somefile.sql to read in the SQL statements in that file and execute them against that database
.read somefile.sql