SQL Queries for Registration (In Progress)