How to make SQL query?

There are 2 tables:

chats_messages:
5df866ff7d43d673950358.jpeg

and users_information:
5df86744ccfc9735988693.jpeg

In the photo I have inserted all the fields of the table. Also in the tables there are foreign keys on the table, but for understanding challenges it does not matter.

The bottom line:

I'm trying to do a query that would return something like this:
5df86856975d0220854654.jpeg

That is, I want to know the name and the name of the person who sent the message and the name of the one who received the message.
April 3rd 20 at 18:54
2 answers
April 3rd 20 at 18:56
Solution
Double connection on users_information
Without attitude, thank you! - Davonte.Macejkovic commented on April 3rd 20 at 18:59
April 3rd 20 at 18:58
Solution
twice join on users_information
Yes, but it still distinct to do - cedrick_Bahringer commented on April 3rd 20 at 19:01
@cedrick_Bahringer, when properly made and adequate join tables do not need any distinct. - Josianne commented on April 3rd 20 at 19:04
@Josianne, I'm talking about things that are... - cedrick_Bahringer commented on April 3rd 20 at 19:07

Find more questions by tags SQL