COUNT()
का उपयोग करें MakeDistinct
. को समूहीकृत करके कार्य करें GROUP BY
. का उपयोग करके कॉलम खंड।
SELECT MakeDistinct AS AfterDistinct
, COUNT(MakeDistinct) AS Count
FROM MyTable
GROUP BY MakeDistinct
आउटपुट:
╔═══════════════╦═══════╗
║ AFTERDISTINCT ║ COUNT ║
╠═══════════════╬═══════╣
║ CAT ║ 3 ║
║ DOG ║ 2 ║
║ PIN ║ 4 ║
╚═══════════════╩═══════╝