zmg
zmg

![Uploading 20240802095001.jpg…]()
SELECT pa.`account_id`, pa.`account_push_config`, pa.`account_status`, pa.`account_ciphertext_type`, MAX(pac.`credential_password`) AS credential_password FROM `pam_account` pa LEFT JOIN ( -- 每个账户只取一个凭证(避免笛卡尔积) SELECT pacr.`account_id`, pac.`credential_password` FROM `pam_account_credential` pac INNER JOIN `pam_account_and_credential_rel` pacr ON pacr.`credential_id` = pac.`credential_id`...