Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7071701
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T05:43:10+00:00 2026-05-28T05:43:10+00:00

So I have a table full of tag keywords. Tags —————— asp sql html

  • 0

So I have a table full of tag keywords.

Tags
------------------
asp
sql
html

and a table full of posts

posts
------------------
I really like ASP
This week with stuff about ASP
This post contains SQL

I want to display the top 10 tags in order of most unique posts containing occurrences in the posts table.

This is what I have but it is rubbish, I am ashamed.

SELECT Tag,(SELECT Count(*) FROM Posts WHERE post LIKE '%Tags.Tag%') As Mentions FROM Tags ORDER BY Mentions DESC

Please help! I know there is some sort of mystical UNION or GROUP BY I am missing here.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T05:43:11+00:00Added an answer on May 28, 2026 at 5:43 am
    SELECT TOP 10 *
    FROM (
        SELECT tag,COUNT(tag) AS Total
        FROM tags t
        JOIN posts p ON p.post LIKE '%' + t.tag + '%'
        GROUP BY tags
    ) totals
    ORDER BY Total Desc
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have a sql table full of address' like this Hattie:07903 000066::Dad:07854 000095::Tom:07903 000044::Allistair:07765
I have a table which is full of arbitrarily formatted phone numbers, like this
I have a table full of cells and i would like to get on
[using SQL Server 2005] I have a table full of users, I want to
I have a database table full of some really ugly and messy data. In
I have a SQL Server table full of orders that my program needs to
I have a table full of domain names. I'd like to do a search
I have table full of timestamps similar to 2011-10-05 08:09:00.000 this is queried by
Converting an old program into an ASP.NET c# site. I have a table full
I have a table full of items that each have a unique ItemID .

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.