Solved

percentage remaining

Posted on 2016-09-20
6
51 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
  • 3
  • 2
6 Comments
 
LVL 28

Accepted Solution

by:
Bill Bach earned 250 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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 3

Assisted Solution

by:awed1
awed1 earned 250 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 250 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Article by: Swadhin
From the Oracle SQL Reference (http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/queries006.htm) we are told that a join is a query that combines rows from two or more tables, views, or materialized views. This article provides a glimps…
Cursors in Oracle: A cursor is used to process individual rows returned by database system for a query. In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and the…
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

911 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now