QueueNo 3B001 3B002 3B003 3G004 3G005 2P001 2G002 2P003 1P001
QueueInitial Count 3 5 2 3 1 1
SELECT LEFT(QueueNo,1) AS QueueInitial, COUNT (*) AS [Count] FROM MyTable GROUP BY LEFT(QueueNo,1)
select substring(QueueNo,0,2) as QueueInitial , count(QueueInitial) as Count from Your_Table_NAME group by substring(QueueNo,0,2)
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)