I have the following two tables.
BookmarkTag ( BookmarkID, TagID )
Tag ( TagID, Title)
Currently I am selecting all the tags with the appropriate BookmarkID. The problem is I want to only select the tag once to avoid duplication in the result and also only bring back the tags the occur the most.
This is my current SQL query:
SELECT Tag.Title
FROM `Tag` INNER JOIN BookmarkTag
WHERE BookmarkTag.BookmarkID = 1 AND Tag.TagID = BookmarkTag.TagID'
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…