SQL for User, Tag and Validation_key tables