I have this sql statement. MAX() - MIN() What the statement does is takes the range of the surface mass of each country and creates the range (MAX -MIN). Feel free to comment if you have a better way of expressing the statement.

  mysql> SELECT MAX(surfacearea) - MIN(surfacearea) 
FROM country;
    | MAX(surfacearea) - MIN(surfacearea) |
    |                         17075399.60 |
    1 row in set (0.00 sec)
New contributor
Chris Kehl is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

closed as off-topic by 200_success, Pieter Witvoet, Ludisposed, Toby Speight, Zeta Nov 9 at 9:05

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Code not implemented or not working as intended: Code Review is a community where programmers peer-review your working code to address issues such as security, maintainability, performance, and scalability. We require that the code be working correctly, to the best of the author's knowledge, before proceeding with a review." – 200_success, Pieter Witvoet, Ludisposed, Toby Speight
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    Welcome on Code Review. I'm afraid this question does not match what this site is about. Code Review is about improving existing, working code. If you're having trouble getting something working, then you'd better ask on StackOverflow (the main site). – Calak Nov 9 at 6:57
  • The code does calculates the difference between the country with the largest surface and that with the smallest surface. If this is what you want it's the best way. – dnoeth Nov 9 at 21:04

Browse other questions tagged or ask your own question.