SQL Accounting but only for specific groups