Code I used to generate a SQL database for my dissertation analysis