Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8622317
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T07:01:25+00:00 2026-06-12T07:01:25+00:00

Write a SQL query that will display the smallest, largest and range of values

  • 0

Write a SQL query that will display the smallest, largest and range of values (ie. largest – smallest) for the MID field. The range of values is the difference between the high and low values, so if the high value were 12, and the low value were 3, the range would be 9. [in 3 columns]
my question is how would i find the range of values from min and max and put the info in a column, if seen between solutions but i need to put it in another column. I could use all the help i can get I’m only a month in sql using
(BANNER
Oracle9i Enterprise Edition Release 9.2.0.1.0 – Production
PL/SQL Release 9.2.0.1.0 – Production
CORE 9.2.0.1.0 Production
TNS for 32-bit Windows: Version 9.2.0.1.0 – Production
NLSRTL Version 9.2.0.1.0 – Production)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T07:01:26+00:00Added an answer on June 12, 2026 at 7:01 am

    Just as a warning, I don’t know Oracle so this may not be perfectly syntactically correct (but the idea will be the same):

    SELECT MIN(MID) AS LowValue
        , MAX(MID) AS HighValue
        , MAX(MID) - MIN(MID) AS ValueRange
    FROM YourTable
    

    All we are doing is getting the smallest value from the column using MIN, the largest value from the column using MAX and then subtracting the largest value from the smallest value for the range in the third case.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Im trying to write an SQL query that will check in the table ‘persons’
I'm trying to write a HQL/Criteria/Native SQL query that will return all Employees that
My question is Write an SQL query that will determine which is the least
I need to write a SQL query that will generate a list of valid
I would like to write a query on a sql 2008 that will report
I am trying to write an SQL query that will sort based on a
I'm trying to write an SQL query that will gather certain data in one
How would I write a SQL query that excludes a record if one (external)
I'm trying to write an SQL query that would search within a CSV (or
I have a SQL query that I'm trying to write, but I'm not quite

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.