Quote:
the sql statement that I try to write permit to count all the conversations stored in the table conversation
If you want to count all conversations:
SELECT COUNT(*) AS CountOfAll
FROM Conversation;
If you want to count all conversations on
Origin
field:
SELECT Origin, COUNT(*) AS CountOfOrigin
FROM Conversation
GROUP BY Origin;
If you want to count all conversations on
Target
field:
SELECT [Target], COUNT(*) AS CountOfTarget
FROM Conversation
GROUP BY [Target];
For furter details, please see:
MySQL :: MySQL 8.0 Reference Manual :: 3.3.4.8 Counting Rows[
^]