Added sql statements & resolved naming conflicts.