How do I get the median/mode/range of a column in SQL using Java?

Posted by Derek on Stack Overflow See other posts from Stack Overflow or by Derek
Published on 2010-04-11T05:44:00Z Indexed on 2010/04/11 5:53 UTC
Read the original article Hit count: 212

Filed under:
|
|

I have to get the median, mode and range of test scores from one column in a table but I am unsure how to go about doing that. When you connect to the database using java, you are normally returned a ResultSet that you can make a table or something out of but how do you get particular numbers or digits? Is there an SQL command to get the median/mode/range or will I have to calculate this myself, and how do you pull out numbers from the table in order to be able to calculate the mode/median/range?

Thanks.

© Stack Overflow or respective owner

Related posts about java

Related posts about mysql