Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQLSERVER Group by
Message
From
26/08/2019 06:38:46
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
SQLSERVER Group by
Miscellaneous
Thread ID:
01670317
Message ID:
01670317
Views:
54
Sir I have these codes
SELECT conn.session_id,
DB_NAME(database_id) as [DB],
host_name,
connect_time,
 net_transport
	   FROM sys.dm_exec_sessions AS sess
JOIN sys.dm_exec_connections AS conn
   ON sess.session_id = conn.session_id
   where DB_NAME(database_id)='at20'
and net_transport='TCP'
It shows data like shown in attachment 1

https://imge.to/i/GBYtf

But I need only this data shown in attachment 2

https://ibb.co/M8trjpr

I mean every unique host_name with min(connect_time)

Please help
Next
Reply
Map
View

Click here to load this message in the networking platform