Created
April 29, 2009 18:09
-
-
Save stammy/103935 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT count(DISTINCT blogs.*) AS count_distinct_blogs_all FROM `blogs` LEFT OUTER JOIN taggings blogs_taggings ON blogs_taggings.taggable_id = blogs.id AND blogs_taggings.taggable_type = 'Blog' LEFT OUTER JOIN tags blogs_tags ON blogs_tags.id = blogs_taggings.tag_id WHERE (context = 'tags' AND blogs_tags.name LIKE 'Technology') ORDER BY created_at DESC LIMIT 0, 15 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment