How does the sql statement query the list of private messages?

my need is to be able to make a list of private messages and take the last private message record. For example, the structure of the data table:
id pid from_userid to_userid content time
10 a b hi 01
21 b a hello 02
3 1 a b hihi 04
40 a c test 09
54 c a test1 11
the list that needs to be obtained is
a b hihi 04
c a test1 11
how to write this sql sentence?

Mar.04,2021

do you want to: the last record of others trusting my and my private trust respectively?

Menu