I'm a SA newbie, so bare with me :)

This is the SQL query for a tag cloud, returning each tag_name and 
it's weight (the count of page tagged with this tag).

SELECT tag_name, COUNT(page_id) AS quantity
      FROM pages_tags JOIN tags USING (tag_id) GROUP BY tags.tag_id
      ORDER BY quantity DESC;

What's the SA equivalent?


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to