```
CREATE TABLE Temp_Account
(
   ID Int IDENTITY(1,1),
   AccountNo Varchar(500)
)

```

.......................................

```
INSERT INTO Temp_Account
SELECT 'AE000111'
UNION ALL
SELECT 'AE000112'
UNION ALL
SELECT 'AE000113'
UNION ALL
SELECT 'AE000114'
UNION ALL
SELECT 'AE000115'

```

........................................

```
 CREATE PROCEDURE Temp_AccountProc
(
   @AccountNo    Varchar(500)
)
AS
BEGIN

   SELECT ID
   FROM   Temp_Account
   WHERE  AccountNo     =      @AccountNo

  END

   EXEC Temp_AccountProc 'AE000111'

   EXEC Temp_AccountProc 'AE000112'

   EXEC Temp_AccountProc 'AE000113'

   EXEC Temp_AccountProc 'AE000111'

   EXEC Temp_AccountProc 'AE000111'

   EXEC Temp_AccountProc 'AE000112'

```

I want to know the most frequently used value in the table. Is there any DMV or any method to find the given output ?

```
 ------------------------------------
    AccountNo          UsedCount
  ------------------------------------

      AE000111            3

      AE000112            2

      AE000113            1

```

---