iMMAP / DRR-datacenter

GNU General Public License v3.0
0 stars 3 forks source link

Extract Organization list data in ASDC #4

Open rafinkanisa opened 2 years ago

rafinkanisa commented 2 years ago

As we'll be re-activating the ASDC, we'll have to review which organization will be deactivated once the re-activated ASDC will be published.

Kindly extract the organization data list which exists in ASDC at the moment. Only extract "Active" users in ASDC

dodiws commented 2 years ago

Query user count group by org_name_status, org_type, org_acronym, organization:

  select 
      org_name_status,
      org_type,
      org_acronym,
      organization,
      count( *)
  from people_profile   
  where 
      username not in ('AnonymousUser','tester')
      and is_active = true
  group by 1,2,3,4
  order by 1,2,3,4,5

Query users with empty organization or org_acronym or org_type or org_name_status:

    select *
    from people_profile 
    where 
        organization is null or trim(organization) = ''
        or org_acronym is null or trim(org_acronym) = ''
        or org_type is null or trim(org_type) = ''
        or org_name_status is null or trim(org_name_status) = ''
        and username not in ('AnonymousUser','tester')
        and is_active = true
    order by organization, username
rafinkanisa commented 2 years ago

Already giving ryan the list. Will be waiting for his feedback of which organization shall be deactivated

rafinkanisa commented 2 years ago

Giving list to Ben and Alex. Waiting for feedback