Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

vwPerson.RecordType definition;

  • Staff=traineeĀ 
  • Contact=trainer
  • Both=Trainee and Trainer
  • Admin=HEE admin


Code Block
languagesql
select status, recordtype, case when emailAddress is null then 'NULL' ELSE 'NOT NULL' end em, count(*) as rc
from [HEELIVE].[vwPerson]
group by status, recordtype, case when emailAddress is null then 'NULL' ELSE 'NOT NULL' end
order by 1,2

Person by Status & RecordTYpe by EmailAddress


statusrecordtypeemailAddressrc
CurrentAdminNOT NULL5367
CurrentAdminNULL981
CurrentBothNOT NULL24137
CurrentBothNULL4851
CurrentContactNOT NULL11134
CurrentContactNULL2941
CurrentStaffNOT NULL56530
CurrentStaffNULL3191