I have a table “Bank” that contains rows for each companies’s banks (company is an other data type). Some companies have only one line (because they have only 1 bank) and other companies have X lines because they have X banks.
I would like to calculate how many companies have 1 bank, how many have 2 banks etc.
Can’t find out how can I do that. Tried with group by and filtered so far without success.
Thanks a lot for your help
I believe you are either in need of the operator :count which would normally be used after a search to know how many results of the search there are.
If you are not looking for that, you may be in search of the :group by operator which is normally used to take a set of data and group them by some data field.
Oh, wait… I think I misunderstood pretty much everything here.
If I understand correctly now (which still might not be the case), I wouldn’t create a new thing in the bank data type for each bank/company combination. Rather, a bank should be its own thing, and you could have a field on the Company data type that stores a list of banks for the company. With that field in place, it would be easy to get a count of company’s that only have a certain number of banks by counting the number of items in each company’s bank list field.