Added realms sql