مطالب تکراری رو بشه ردیابی و حذفشون کرد
SELECT
t.thread_id,
t.title, COUNT(t.title),
t.username, COUNT(t.username),
p.message, COUNT(p.message)
FROM
xf_thread t
INNER JOIN
xf_post p ON p.thread_id = t.thread_id
WHERE
p.position = 0
GROUP BY
t.title,
t.username,
p.message
HAVING
COUNT(t.title) > 1
AND COUNT(t.username) > 1
AND COUNT(p.message) > 1;
مطالب تکراری رو بشه ردیابی و حذفشون کرد
SELECT
t.thread_id,
t.title, COUNT(t.title),
t.username, COUNT(t.username),
p.message, COUNT(p.message)
FROM
xf_thread t
INNER JOIN
xf_post p ON p.thread_id = t.thread_id
WHERE
p.position = 0
GROUP BY
t.title,
t.username,
p.message
HAVING
COUNT(t.title) > 1
AND COUNT(t.username) > 1
AND COUNT(p.message) > 1;
SELECT
GROUP_CONCAT(t.thread_id),
GROUP_CONCAT(t.view_count),
t.title, COUNT(t.title),
t.username, COUNT(t.username),
p.message, COUNT(p.message)
FROM
xf_thread t
INNER JOIN
xf_post p ON p.thread_id = t.thread_id
WHERE
p.position = 0
GROUP BY
t.title,
t.username,
p.message
HAVING
COUNT(t.title) > 1
AND COUNT(t.username) > 1
AND COUNT(p.message) > 1;