How to write a sql statement like mysql and solve it online? can it be regarded as field mapping?

in the recent study of mysql, I intend to use a live chat system to practice. The following is a user name, an information table
users table, with structural data as shown in figure
clipboard.png
msgs,

clipboard.png

2,
1
clipboard.png
2

clipboard.png

.

Thank God for his answer. The answer is as follows

SELECT b.id as "ID" ,b.alias as "" ,a.fromId as "id",b.alias as "",a.toId as "id",
c.alias as "", a.content as ""
FROM msgs as a
INNER JOIN users as b
ON a.fromId = b.id
INNER JOIN users as c
Mar.23,2021

SELECT b.id as' user ID', b.alias as' user nickname', a.fromId as' Sender id',b.alias as' Sender nickname, a.toId as' recipient id',
c.alias as' recipient nickname, a.content as' send content'
FROM msgs as a
INNER JOIN users as b
ON a.fromId = b.id
INNER JOIN users as c
ON a.toId = c.id

clipboard.png

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3a881-2c207.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3a881-2c207.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?