Solved

MySQL: MIN() and MAX() and MAX()-MIN() Inacurate

Posted on 2013-05-15
4
322 Views
Last Modified: 2013-05-16
In this example, I want to get the minimum and maximum values of a matching column, as well as the difference between them.

However the results do not match the values in the database.

http://sqlfiddle.com/#!2/d93a2/3
0
Comment
Question by:hankknight
  • 2
4 Comments
 
LVL 40

Expert Comment

by:Sharath
ID: 39169716
I didn't get the question. What is the expected value?
0
 
LVL 16

Author Comment

by:hankknight
ID: 39169894
The value of:
BIDMIN_SHOULD_BE_0_94693
Should be:
0.94693

The value of:
BIDMAX_SHOULD_BE_0_94793
Should be:
0.94793

The value of:
BID_RANGE_SHOULD_BE_0_001
0.001

http://sqlfiddle.com/#!2/d93a2/3
0
 
LVL 40

Accepted Solution

by:
Sharath earned 500 total points
ID: 39170535
Do you want to round to 5 digits?
see this. http://sqlfiddle.com/#!2/d93a2/10
0
 
LVL 108

Expert Comment

by:Ray Paseur
ID: 39171590
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Introduction In this article, I will by showing a nice little trick for MySQL similar to that of my previous EE Article for SQLite (http://www.sqlite.org/), A SQLite Tidbit: Quick Numbers Table Generation (http://www.experts-exchange.com/A_3570.htm…
Creating and Managing Databases with phpMyAdmin in cPanel.
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

758 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

22 Experts available now in Live!

Get 1:1 Help Now