Using SQL I have
| Message_From | Message_To |Message| Message_Time(Current TimeStamp)|
| -------------| ------------|------ | -------------------------------|
| abc@gmail.com|pof@gmail.com| Abc |2022-04-22 12:26:13 |
| abc@gmail.com|gof@gmail.com| DEF |2022-04-22 12:26:31 |
| abc@gmail.com|gof@gmail.com| CED |2022-04-22 12:26:51 |
I want to be show as
| Message_From | Message_To | Message_Time(Current TimeStamp)|
| -------------| ------------|------------------- |
| abc@gmail.com|pof@gmail.com|2022-04-22 12:26:13 |
| abc@gmail.com|gof@gmail.com|2022-04-22 12:26:51 |
I want to select the distinct Message_To With the the last Message sent.
I have written a query but its not working as my query is showing all the 3 peoples because the Message time stamp is different
SELECT DISTINCT
[Message_From], [Message_To]
FROM
[messages]
WHERE
[Message_From] = '$Email'
Any idea for this?