Getting latest tweet from trending hashtags Mysql
<p>I have 3 tables (tweets, hashtags, tweets_hashtags)</p>

<p>I currently am using a query that gives me trending hashtags, but I also would like to add a subquery in there to give me the latest tweet containing that trending hashtag. The output actually already gives me a tweet, but it is the first record not the latest. </p>

<pre><code>SELECT
    count(*) AS count,
        tweets.date_published,
        tweets.content,
        hashtags.hashtag
FROM
    tweets_hashtags
INNER JOIN hashtags ON tweets_hashtags.hashtag_id = hashtags.id
INNER JOIN tweets ON tweets_hashtags.tweet_id = tweets.id
WHERE tweets.date_published &gt;= 604800
GROUP BY
    tweets_hashtags.hashtag_id
ORDER BY
    count DESC
LIMIT 10
</code></pre>

<p>What would be the best approach here to get the last tweet record?</p>