I have this sets of data:
name fruit location
mary apple east
ben pear east
peter pear east
ben apple north
ben mango north
peter mango north
mary orange north
alice pear north
janet pear north
janet mango west
janet mango west
peter mango west
janet pear west
I want to get fields: name, number of fruits sent to name, number of fruits sent to name in location
I tried:
|stats sum(count) as scount_by_name by name
|stats count as count_by_namelocation (......filled with other formulas......) by name location
|Table count_by_namelocation scount_by_name
But it does not work, scount_by_name is empty, what's the correct syntax for this?