Definition
Information
Section titled “Information”The Dbo Useridentifier model holds identifier values recorded for users. Each entry keeps a user identifier, identifier-type identifier and identifier value together, alongside the organisation information recorded for that entry, describing the value and its recorded type for the user.
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 with dbo.user and dbo.useridentifiertype details
Section titled “dbo.useridentifier with dbo.user and dbo.useridentifiertype details”Return records alongside descriptive values from the related tables.
SELECT m."_primary_key", m."userid", p1."displayname" AS "user_displayname", m."useridentifiertypeid", p2."description" AS "useridentifiertype_description"FROM dbo.useridentifier AS mLEFT JOIN dbo.user AS p1 ON p1."userid" = m."userid" AND p1."organisation" = m."organisation"LEFT JOIN dbo.useridentifiertype AS p2 ON p2."useridentifiertypeid" = m."useridentifiertypeid" AND p2."organisation" = m."organisation";Row count by dbo.user displayname
Section titled “Row count by dbo.user displayname”Count dbo.useridentifier records for each dbo.user value, joined on userid.
SELECT p."displayname" AS "user_displayname", COUNT(*) AS row_countFROM dbo.useridentifier AS mINNER JOIN dbo.user AS p ON p."userid" = m."userid" AND p."organisation" = m."organisation"GROUP BY p."displayname"ORDER BY row_count DESC;Row count by dbo.useridentifiertype description
Section titled “Row count by dbo.useridentifiertype description”Count dbo.useridentifier records for each dbo.useridentifiertype value, joined on useridentifiertypeid.
SELECT p."description" AS "useridentifiertype_description", COUNT(*) AS row_countFROM dbo.useridentifier AS mINNER JOIN dbo.useridentifiertype AS p ON p."useridentifiertypeid" = m."useridentifiertypeid" AND p."organisation" = m."organisation"GROUP BY p."description"ORDER BY row_count DESC;