Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQLSERVER Group by
Message
De
26/08/2019 06:38:46
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
SQLSERVER Group by
Divers
Thread ID:
01670317
Message ID:
01670317
Vues:
55
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform