I have table like this:
id | Name | Buy
---+-------+-----
1 | Alice | Apple
2 | Alice | Banana
3 | Alice | Apple
4 | Bob | Apple
How to write one line SQL command that showing result like below?
Name | Apple | Banana
------+-------+-------
Alice | 2 | 1
Bob | 1 | 0