Second table started

SQL query needs to cater to the foreign keys