A Salesforce CLI plugin to execute SOQL Query All command to retrieve all rows including deleted and archived records.
sfdx queryAll -q <query> -u <orgname> -r <resultformat>
Execute SOQL Query All command to retrieve all rows including deleted and archived records
TypeScript