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)
Write a SQL query that will display the smallest, largest and range of values
Share
Just as a warning, I don’t know Oracle so this may not be perfectly syntactically correct (but the idea will be the same):
All we are doing is getting the smallest value from the column using
MIN, the largest value from the column usingMAXand then subtracting the largest value from the smallest value for the range in the third case.