Assume that I have this dataset

```
a = Dataset[{<|"A" -> "A1", "B" -> 2|>, <|"A" -> "A1", "B" -> 3|>}]

```

How can I get the total of Key["B"] like this:

![enter image description here](https://i.stack.imgur.com/IVQz5.jpg)

In general, I want to do something like this (here, with sum. but could be anything)

```
SELECT key, sum(value) FROM tbl GROUP BY key

```