Definition
Information
Section titled “Information”The Dbo User model holds user identity and account details, including names, email address, sex, login name and user identifiers. It also records automatic-login, system-user, EMIS-distributed and deleted flags, alongside a flag concerning skipped password-reset security details and organisation information.
Soft-Deleted Records
Section titled “Soft-Deleted Records”_deleted indicates whether the record has been deleted in the source system.
Examples
Section titled “Examples”dbo.useridentifier count per dbo.user
Section titled “dbo.useridentifier count per dbo.user”Count related dbo.useridentifier records for each dbo.user record, joined on userid.
SELECT m."userid", m."displayname", COUNT(c."userid") AS useridentifier_countFROM dbo.user AS mLEFT JOIN dbo.useridentifier AS c ON m."userid" = c."userid" AND m."organisation" = c."organisation"GROUP BY m."userid", m."displayname"ORDER BY useridentifier_count DESC;dbo.useridentifier records with dbo.user details
Section titled “dbo.useridentifier records with dbo.user details”List dbo.useridentifier records with the dbo.user values they reference through userid.
SELECT c."_primary_key", m."userid", m."displayname" AS "user_displayname"FROM dbo.useridentifier AS cINNER JOIN dbo.user AS m ON m."userid" = c."userid" AND m."organisation" = c."organisation";dbo.userinrole count per dbo.user
Section titled “dbo.userinrole count per dbo.user”Count related dbo.userinrole records for each dbo.user record, joined on userid.
SELECT m."userid", m."displayname", COUNT(c."userid") AS userinrole_countFROM dbo.user AS mLEFT JOIN dbo.userinrole AS c ON m."userid" = c."userid" AND m."organisation" = c."organisation"GROUP BY m."userid", m."displayname"ORDER BY userinrole_count DESC;