Solving sql Association query

SELECT *
FROM `table_1`
WHERE `reply_parent` IN
    (SELECT `reply_id`
     FROM
       (SELECT `reply_id`
        FROM `table_1`
        WHERE `reply_article`=69
          AND `reply_type`=0
        LIMIT 0,
              5)AS t)
UNION
  (SELECT *
   FROM `table_1`
   WHERE `reply_article`=69
     AND `reply_type`=0
   LIMIT 0,
         5)
ORDER BY `create_time` DESC

the query above will query the information in "table_1" . Now you need to use the username field in the queried result set to associate the username field in table_2. Then UNION the result from the query and the result set from the first "table_1" query

my sql belongs to the entry level, and I am at a loss when it comes to a lot of sql queries, looking for answers. Please

Mar.12,2021
Menu