Howto put these two queries together?
sql = "SELECT DISTINCT medium_id, COUNT(tag) AS count FROM tags WHERE
tag = 'test' GROUP BY medium_id ORDER BY count DESC"
This query is working.
Id like to try something like
sql = "SELECT * FROM media WHERE id IN (SELECT DISTINCT medium_id FROM
tags WHERE tag = 'test')"
But how can I order the resut by quantity (counts of tag)?
Thank you for help.
//BEN