My statement is correct missing one Column, but it does not insert the hashtag from table trending_topics into the rss table based on order.
Any adjust can help me with my statement.
INSERT INTO rss (id,hashtag,total)
SELECT
hashtag,
SUM(count) AS total
FROM `trending_topics`
WHERE lang=0
AND hashtag != ''
AND date >= date_sub(left(now(), 10), interval 1 day)
GROUP BY hashtag order by total desc;;
My insert into table (rss) looks like:
id hashtag total
1 null 55
2 null 22
If the datatypes and your example sql etc. are correct (and there is a hashtag returned by the select) then the following should work (remove the id in the insert into statement)