Solved

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

Posted on 2013-05-15
4
327 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
[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
  • 2
4 Comments
 
LVL 41

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 41

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 110

Expert Comment

by:Ray Paseur
ID: 39171590
0

Featured Post

Get Database Help Now w/ Support & Database Audit

Keeping your database environment tuned, optimized and high-performance is key to achieving business goals. If your database goes down, so does your business. Percona experts have a long history of helping enterprises ensure their databases are running smoothly.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Help With Simple Database Design 7 70
reverse engineer .sql from php files 11 67
Survey branching tutorial 11 78
restriction of entering a a page 5 44
This guide whil teach how to setup live replication (database mirroring) on 2 servers for backup or other purposes. In our example situation we have this network schema (see atachment). We need to replicate EVERY executed SQL query on server 1 to…
Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

752 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