Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

percentage remaining

Posted on 2016-09-20
6
Medium Priority
?
91 Views
Last Modified: 2016-09-20
We put engines on the planes, Each engine has time_since_new - eg 22538 (in hours)

We also have a customer profile that we say that for this customer the life limit hours is 50000 ( hours)
Now I want to calculate the percentage time remaining

I do 50000 minus 22538 and then get the percentage? Help appreciated.
0
Comment
Question by:anumoses
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 28

Accepted Solution

by:
Bill Bach earned 1000 total points
ID: 41807013
(TotalLife - UsedLife) / TotalLife * 100%, or (50000 - 22538)/50000 * 100%.
0
 
LVL 6

Author Comment

by:anumoses
ID: 41807020
((life_limit_hours/percent_time_remaining)*100) as answer_percent

As you mentioned this seems correct
0
 
LVL 6

Author Comment

by:anumoses
ID: 41807038
select round((50000 - 22538)/50000 * 100,2) from dual

I get 54.92 percent remaining
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 3

Assisted Solution

by:awed1
awed1 earned 1000 total points
ID: 41807048
1- [Current hours (22538)/Total hours(50000)]=%of hours remaining.
1-.45076 = .54924 which is 54.924% rounds to 55%
0
 
LVL 28

Assisted Solution

by:Bill Bach
Bill Bach earned 1000 total points
ID: 41807052
Exactly.  If you didn't want the value as a percentage, simply eliminate the *100 and you'll be left with a decimal value.
0
 
LVL 6

Author Closing Comment

by:anumoses
ID: 41807179
Thanks
1

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Background In several of the companies I have worked for, I noticed that corporate reporting is off loaded from the production database and done mainly on a clone database which needs to be kept up to date daily by various means, be it a logical…
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question