Quantcast
Channel: Questions in topic: "distinct"
Viewing all articles
Browse latest Browse all 38

SQL SELECT Distinct Query question

$
0
0
I have a database table called Events that has the following columns: [Event_ID][Date_Time][Computer][User] I am trying to find the most recent [Date_Time] for each distinct [Computer] and [User] SELECT DISTINCT [Date_Time],[Computer],[User] will give me every row as [Date_Time] makes them all unique. Doing a SELECT DISTINCT [Computer], [User] is perfect, except it doesn't have the most recent [Date_Time] with it. Thanks in advance, I am sure the answer is obvious to you all and I am just missing something simple.

Viewing all articles
Browse latest Browse all 38

Trending Articles