mysql count unique row values

前端 未结 5 976
孤街浪徒
孤街浪徒 2021-02-19 03:30

TABLE quotation

id  clientid
1   25
2   25
3   25
4   25
5   26

How can I query how many different clients exist in TABLE qu

5条回答
  •  闹比i
    闹比i (楼主)
    2021-02-19 03:57

    I find a way out

    SELECT COUNT(*) as total FROM (SELECT COUNT(*) FROM quotation GROUP BY
    clientid) t1
    

提交回复
热议问题