Can we do something like SELECT DISTINCT (number, deviceId) instead of passing in Account and doing one query per device?