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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T17:53:29+00:00 2026-05-31T17:53:29+00:00

I have this table : Name | money_earned _______________________ john | 100 paul |

  • 0

I have this table :

Name   |  money_earned
_______________________

john   |   100
paul   |   200
ringo  |   300
george |   200

I want to calc ( in the most intelligent way) – near each row

What is the percentage of benefit( of each beatle) – relative to the total sum

So i want a reult like this : ( the sum is 800)

Name   |  money_earned| his_Percentage
__________________________________

john   |   100        |   0.125
paul   |   200        |   0.25
ringo  |   300        |   0.375
george |   200        |   0.25

Thank 🙂

edit

I’ll be glad to have a solution like rollup does.

it count the sum , and overall sum…something like this function.

So lets say I want it in 1 query without declaring extra pre-calculated values.

  • 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-31T17:53:30+00:00Added an answer on May 31, 2026 at 5:53 pm
    select Name,
           money_earned,
           money_earned / sum(money_earned) over() as his_Percentage
    from [Table]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a table like this: name code group john 12 smith 15 how
Really simple example: Let's say I have this table: ID Name GUID1 John GUID2
Suppose we have this person table id name gender 1 John male 2 Kurt
For example have this table: Name | BodyType ---------------- John | 1 Ted |
I have this table: Department NAME EMAIL ID DATE1 DATE2 1 John asd@asd.com 74
I have this class called Table: class Table { public string Name { get
If I have a table like this: CREATE TABLE sizes ( name ENUM('small', 'medium',
I have a DataGridView binded to this table: [Users] ID Name -- ---- 11
I have two table like this table_CN (_id, name, phone, favorite, title) table_EN (_id,
I have this XML in a column in my table: <keywords> <keyword name=First Name

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.