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 7740819
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T08:52:38+00:00 2026-06-01T08:52:38+00:00

i have a t_class table in mySql, in this table there are 3 columns,

  • 0

i have a t_class table in mySql,
in this table there are 3 columns, No, CLASS and POINT.
and there are approximately 5000 records in this table. i want the count of classes in this table.

No    CLASS     POINT
1     9         100
2     10        70
3     11        80
4     9         90
5     10        50
6     M         60
7     M         70
8     9         40
9     10        90
10    11        90
11    M         80
12    M         75
13    11        40
14    10        100
15    9         60

As you see there 4 types of classes – 9, 10, 11 and M.
But there is one problem. When it calculates the count of classes it must
summarize 11-th and M th classes. For example

CLASS    COUNT
9        4
10       4
11       7

Thanks.

  • 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-06-01T08:52:39+00:00Added an answer on June 1, 2026 at 8:52 am
    SELECT CLASS, COUNT(*) AS CNT
    FROM table
    GROUP BY CASE WHEN CLASS='M' THEN '11' ELSE CLASS END
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a property on a class that happens to be a Table<T> .
I don't have any idea how to use this class in .net. Anyone wants
I have code that looks like this: class T {}; class container { const
I have code that looks like this: template<class T> class list { public: class
In our MySQL database, I have a third_party_accounts table and it has_many third_party_campaigns .
I have a MYSQL table that is 1275 fields wide. Each row in the
I have this code that prints out columns in my DB and adds a
I have a MySQL table for persistence of some Java objects and use Hibernate
For simplicity's sake, let's say we have this rather contrived table: [ID] [Weekday] [Weather]
I have 2 question I wanna make Mysql table that have charset utf8 but

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.