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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T09:46:58+00:00 2026-06-13T09:46:58+00:00

I have a table like this: A B C Value 1990 1 1 0.791684449

  • 0

I have a table like this:

A      B        C         Value
1990    1   1   0.791684449
1990    1   2   0.058315583
1990    2   3   2.940000057
1990    3   4   8.975000381
1990    4   5   0
1990    4   6   0.004666695
1990    4   7   0.401333332
1990    5   8   2.609000206
1990    6   9   6.400992393
1990    6   10  9.489910126
1990    6   11  1.31809783
1990    7   12  214.4270172
1990    8   13  0.097975887
1990    8   14  0.680250943
1990    8   15  9.270773888
1990    9   16  1.204782724
1990    9   17  4.113919258
1990    9   18  3.486953974
1990    9   19  1.675345063
1990    10  20  0.434966862
1990    10  21  2.561163187
1990    10  22  2.415041685
1990    10  23  2.660344124
1990    10  24  7.127485275

Now I want to add only those values whose B is same & display in a table according to the C like:

1990        1   0.850000031
1990        2   2.940000057
1990        3   8.975000381
1990        4   0.406000027
1990        5   2.609000206
1990        6   17.20900035

How can I do this in MySQL?

  • 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-13T09:46:59+00:00Added an answer on June 13, 2026 at 9:46 am

    Use GROUP BY and SUM.

    Try this SQL:

    SELECT A, B, SUM(Value) AS TotalValue
    FROM yourtable
    GROUP BY A, B
    

    See it working online: sqlfiddle

    See the documentation for more details:

    • GROUP BY (Aggregate) Functions
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For example I have a table MyTable like this: Id Value Rate 1 10
I have a table that looks like this: id value AGA 0.211 AGA 0.433
I have a table like this one: id group value 1 GROUP A 0.641028
Lets Say i have a table like this WEB_LIST_TABLE KEY Value ---------------------------------------- 134 google.com
I have a MySQL table structured somewhat like this: type name value ===================== 1
I have a table that looks something like this: Name Year Value A 2000
I have a value in my MS SQL table column called XDATA like this:
i have a table like this NAME VALUE ----------------- bla 1 bla 2 bla
I have table like this: id number value 1 300 233 2 343 434
I have a table like this: TITLE DESCRIPTION test1 value blah blah value test2

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.