SELECT DISTINCT core_duggauser id core_duggauser password core_duggaus

1
SELECT DISTINCT "core_duggauser"."id", "core_duggauser"."password", "core_duggauser"."last_login", "core_duggauser"."is_superuser", "core_duggauser"."email", "core_duggauser"."urkund_analysis_email", "core_duggauser"."cc_email", "core_duggauser"."school_id", "core_duggauser"."is_active", "core_duggauser"."is_staff", "core_duggauser"."date_joined", "core_duggauser"."first_name", "core_duggauser"."last_name", "core_duggauser"."personal_identity_number", "core_duggauser"."profile_image", "core_duggauser"."phone", "core_duggauser"."sAMAccountName", "core_duggauser"."default_num_answer_options", "core_duggauser"."cover_page_template", "core_duggauser"."hand_in_message_template", "core_duggauser"."skolon_id", "core_duggauser"."microsoft_id", "core_duggauser"."msds_tenant_id", "core_duggauser"."vklass_id", "core_duggauser"."use_external_integration", "core_duggauser"."external_integration_id", "core_duggauser"."external_integration_type_id", "core_duggauser"."canvas_id", "core_duggauser"."timezone", "core_duggauser"."temporary_password_set", "core_duggauser"."last_releasenote_viewed", "core_duggauser"."is_accountless", "core_duggauser"."modified_date", "core_school"."id", "core_school"."name", "core_school"."timezone", "core_school"."skolon_id", "core_school"."msds_id", "core_school"."vklass_id", "core_school"."lti_id", "core_school"."adress", "core_school"."zipcode", "core_school"."city", "core_school"."municipality", "core_school"."ad_ldap_url", "core_school"."ad_domain", "core_school"."ad_search_dn", "core_school"."logo", "core_school"."background", "core_school"."auto_create_urkund_user", "core_school"."urkund_unit_id", "core_school"."urkund_organization_id", "core_school"."licence_until", "core_school"."safe_exam_browser_windows_version_id", "core_school"."whitelisted_urls" FROM "core_duggauser" LEFT OUTER JOIN "core_school" ON ( "core_duggauser"."school_id" = "core_school"."id" ) LEFT OUTER JOIN "core_duggauser_extra_schools" ON ( "core_duggauser"."id" = "core_duggauser_extra_schools"."duggauser_id" ) INNER JOIN "core_duggauser_groups" ON ( "core_duggauser"."id" = "core_duggauser_groups"."duggauser_id" ) INNER JOIN "auth_group" ON ( "core_duggauser_groups"."group_id" = "auth_group"."id" ) INNER JOIN "core_duggauser_schoolclasses" ON ( "core_duggauser"."id" = "core_duggauser_schoolclasses"."duggauser_id" ) INNER JOIN "core_schoolclass" ON ( "core_duggauser_schoolclasses"."schoolclass_id" = "core_schoolclass"."id" ) WHERE (("core_duggauser"."school_id" = 1373 OR "core_duggauser"."school_id" IN (SELECT U0."id" FROM "core_school" U0 INNER JOIN "core_duggauser_extra_schools" U1 ON ( U0."id" = U1."school_id" ) WHERE U1."duggauser_id" = 41703) OR "core_duggauser_extra_schools"."school_id" = 1373 OR "core_duggauser_extra_schools"."school_id" IN (SELECT U0."id" FROM "core_school" U0 INNER JOIN "core_duggauser_extra_schools" U1 ON ( U0."id" = U1."school_id" ) WHERE U1."duggauser_id" = 41703)) AND "core_duggauser"."is_active" = true AND "auth_group"."name" = 'student' AND "core_schoolclass"."inactive" = false) ORDER BY "core_duggauser"."first_name" ASC