MySQL Forums
Forum List  »  Newbie

Re: How to remove min and max and take average of remaining values from a row?
Posted by: Pramod Patki
Date: November 18, 2015 10:07AM

Another option that could help me here is if I get values of avg1-avg6 in single column instead of 6 different columns. Is there any way (using UNION, etc) to get data in this format:
+-------------------+---------+
| type | average |
+-------------------+---------+
| O | 24.5833 |
| O | 18.0286 |
| O | 17.9843 |
| O | 17.6145 |
| O | 17.8780 |
| O | 17.7976 |
| R | 30.4167 |
| R | 23.0656 |
| R | 23.0620 |
| R | 22.5315 |
| R | 22.9573 |
| R | 22.7793 |
| S | 5.5833 |
| S | 2.4963 |
| S | 2.4958 |
| S | 2.4665 |
| S | 2.4893 |
| S | 2.5833 |
+-------------------+---------+

Thanks in advance.

Options: ReplyQuote


Subject
Written By
Posted
Re: How to remove min and max and take average of remaining values from a row?
November 18, 2015 10:07AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.