SQL @@CONNECTIONS Statistical Function returns the number of connections since the last time SQL server started. It includes both successful and unsuccessful connections. The syntax behind this is @@CONNECTION is
@@CONNECTIONS
SQL @@CONNECTIONS Example
The code snippet below will show you the total number of connections for this SQL Server. Learn more about SQL GETDATE from our SQL tutorial page.
SELECT @@CONNECTIONS AS [Total Connections]

You can use the GETDATE() function along with this function to see the total number of connections until today. Please refer to the SQL @@IDLE article.
SELECT @@CONNECTIONS AS [Total Log In Attempts], GETDATE() AS [As of Today]
