DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Richard has posted 22 posts at DZone. View Full User Profile

Return Ordered List Of Near Match Items Based On Tag Matches

02.09.2006
| 3260 views |
  • submit to reddit
        // description of your code here

select t2.dbid, t2.tag, count(t2.dbid) as match_count from tags as t1, tags as t2 where t1.dbid = '105319' and t2.tag = t1.tag and t1.dbid != t2.dbid GROUP BY t2.dbid 1 ORDER BY match_count;