Because the groups overlap, I think conditional aggregation is a better approach:

select sum(cnt &gt;= 1) as trans_1,
       sum(cnt &gt;= 5) as trans_5,
       sum(cnt &gt;= 10) as trans_10,
       sum(cnt &gt;= 20) as trans_20
from (select card_id, count(*) as cnt
      from trans
      group by card_id 
      ) d;


SQL how to count the number of credit cards that had at least 1,5,10,20 etc transactions
Many times since I have gotten ubuntu on my Samsung Chromebook (That itself being a grueling process) I have tried to   extract files. But, every time, no matter what .zip file I am trying to extract, I get this message "Could not open archive, MIME-type unsupported or file did not exist" . I would be glad to provide any other needed info. Just tell me what you need! 
