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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T05:31:34+00:00 2026-05-15T05:31:34+00:00

Here is mysql data id usr good quant delayed cart_ts —————————————————— 14 4 1

  • 0

Here is mysql data

id usr good quant delayed   cart_ts 
    ------------------------------------------------------
14  4   1   1   0   20100601235348
13  4   11  1   0   20100601235345
12  4   4   1   0   20100601235335
11  4   1   1   0   20100601235051
10  4   11  1   0   20100601235051
9   4   4   1   0   20100601235051
15  4   2   1   0   20100601235350
16  4   7   1   0   20100602000537
17  4   3   1   0   20100602000610
18  4   3   1   0   20100602000616
19  4   8   1   0   20100602000802
20  4   8   1   0   20100602000806
21  4   8   1   0   20100602000828
22  4   8   1   0   20100602000828
23  4   8   1   0   20100602000828
24  4   8   1   0   20100602000828
25  4   8   1   0   20100602000828
26  4   8   1   0   20100602000829
27  4   8   1   0   20100602000829
28  4   9   1   0   20100602001045
29  4   10  1   0   20100602001046

I need to group fields in witch usr & good has duplicated values with summing quant field
for getting smth like this:

id usr good quant delayed   cart_ts 
    ------------------------------------------------------
14  4   1   2   0   20100601235348
13  4   11  2   0   20100601235345
12  4   4   2   0   20100601235335
15  4   2   1   0   20100601235350
16  4   7   1   0   20100602000537
17  4   3   2   0   20100602000610
19  4   8   9   0   20100602000802
28  4   9   1   0   20100602001045
29  4   10  1   0   20100602001046

Which MySQL query I need to do to have this effect?

  • 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-15T05:31:34+00:00Added an answer on May 15, 2026 at 5:31 am

    SELECT id,usr,good,SUM(quant),delayed,cart_ts FROM table GROUP BY usr,good

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So here's the problem. I have data in a MySQL DB as text. The
I have a MySQL/Rails app that needs search. Here's some info about the data:
I'm having trouble loading the mysql data to the option box using php. Here's
please I have the same problem as I found here MySQL - Selecting data
This question here: MySQL: INSERT IGNORE or ON DUPLICATE KEY UPDATE with checking multiple
I've look all over the web and in the questions asked here about MySQL
Here is my MySQL Query that im trying to execute. it keeps failing with
here is my mysql and php code layout: I have 3 tables tableA stores
a bit of a PHP / MySQL newbie here... I've been building a PHP-based
I'm trying to get a std::string from my database using mysql connexion Here is

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.