I’m trying to come up with a table that displays the total number of common elements in a table.
For example. I have a table A with values:
colName
=============
a
b
b
c
c
c
d
Is there any way that I can come up with a result that displays:
colName totalCount
==================
a 1
b 2
c 3
d 1
This is a simple query using an aggregate function
COUNTandGROUP BYclause.totalCountis called the ALIAS ofCOUNT(colName)