Home > database >  The query command for help
The query command for help

Time:03-29

Such as data

The sender to the recipient
A 1
A 1
A 2
A 3
4 B
4 B
5 C
6 D
7 D
E 8
F 8
9 F
G 0

How to statistics the sender a total of how much a letter, and the sender to the recipient, number after heavy
If the calculated results
Further to sender counting different recipient
A 4 3
B 2 1
C 1 1
2 2 D
E 1 1
F 2 2
G 1 1


Seek help from a great god

CodePudding user response:

Select the send, the count (*), count (distinct reciver) from table group by the send;
  • Related