How can I cross join the result of this query with itself?
sql-fiddle: http://sqlfiddle.com/#!2/88f5e2/2
SELECT t.tid ,count(*) AS count
FROM taxonomy_index t
JOIN taxonomy_term_data td ON td.tid = t.tid
WHERE t.created > UNIX_TIMESTAMP() - 3 * 86400 AND td.vid = 1
GROUP BY t.tid
ORDER BY count DESC
LIMIT 0, 5;
the query result is:
tid count
4429 6
2634 5
1703 4
1742 4
4468 4
I need:
4429 4429 6
2634 4429 5
1703 4429 4
1742 4429 4
4468 4429 4
4429 2634 .
2634 2634 .
1703 2634 .
1742 2634
4468 2634
4429 1703
2634 1703
1703 1703
1742 1703
4468 1703
.... ....