added sql code that generated the tables for my analysis