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

  • Home
  • SEARCH
  • 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 7753933
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T12:10:46+00:00 2026-06-01T12:10:46+00:00

I have multiple tables that need to be merged into one. SELECT name, SUM(money)

  • 0

I have multiple tables that need to be merged into one.

SELECT name, SUM(money) AS MONEY FROM transactions
JOIN results ON transactions.id = results.id
JOIN more ON results.per_id = more.per_id
GROUP BY name

The output is person’s name (first column) and person’s money (second column).

name | money
aaron  1220
mike   800
john   200
kate   600

Now I try to filter the result by a money amount, i.e. to show results for people with “Sum(money) > 500”

for that reason I tried putting “WHERE money > 500 GROUP BY name” however the output was wrong (aaron 1000, mike 610, etc..).

how do you write a query to filter the last/ending result?

  • 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-01T12:10:47+00:00Added an answer on June 1, 2026 at 12:10 pm
    Group By Name
    having sum(money) > 500
    

    EDIT : what do you meen by “last / ending result” ?

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

Sidebar

Related Questions

I have a query that transfers data from multiple slave tables into a single
i have a stored procedure that has to retrieve data from multiple tables something
I want to delete multiple records at once. I have two tables, one that
I have a XML file that I need to populate multiple SQL tables, and
I have multiple tables with information about tube videos. I need to join these
If I need to update or insert into multiple tables with one action, example
I have multiple (13 in numbers) tables that have one thing in common: Their
I have multiple instances of data displayed in tables that need to be sorted
I have multiple tables that I want to join to get a specific result.
I have a stored procedure that returns multiple tables. How can I execute and

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.