on 2024 Dec 30 11:41 PM
I have two tables, one just a customer information and the other is all the casenotes tie to that customer. I just want to see the latest casenote ONLY for my customer. I create this query but it giving all the casenotes. Please help.
SELECT
c.userID,
c.FirstName,
c.LastName,
MAX(cn.noteDate) as "Last CN Date"
FROM UsercustomerDetails c
LEFT JOIN Casenotes cn
ON c.UserID=cn.UserID
Where c.userid='309277851'
GROUP BY c.UserID, c.FirstName, c.LastName,cn.noteDate,cn.title,cn.note
Result:
I need to make it display the last record only.
Request clarification before answering.
(removed)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
64 | |
10 | |
8 | |
8 | |
7 | |
6 | |
6 | |
6 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.