I have read some StackOverflow which similar to my questions but I can't find the exact same of my problem. I have read: select max value of each group including other column and Select max value of each group and Select max value of each group
So here is my problem.
I have a table which looks like
+---------+---------------+-----------------------+
|column_1 | column_2 | column_3 |
+---------+---------------+-----------------------+
| A | 200 | 1618558797853684118 |
| A | 198.7 | 1618558797854783205 |
| A | 201.3 | 1618558797855282263 |
| B | 350.5 | 1618558775580928115 |
| B | 349.9 | 1618558775581128138 |
| B | 350.1 | 1618558775580856107 |
| C | 532 | 1618558797852667035 |
| C | 531 | 1618558775580345051 |
| A | 300 | 1618558797855492289 |
| A | 302 | 1618558797852512023 |
| ... | ........ | ... |
+---------+---------------+-----------------------+
So as you can see the three of each row given each alphabet on column_1
almost have the same value, right? I need to get one of each of them, but only in the sequences. Let's take a look at the desired output for more clarity:
Desired output
+---------+---------------------------------------------------------------+-------------------------+
|column_1 | column_2 | column_3 |
+---------+---------------------------------------------------------------+-------------------------+
| A | it can be (200 or 198.7 or 201.3) does not matter which one | (depends on column_2) |
| B | it can be (350.5 or 349.9 or 350.1) does not matter which one | (depends on column_2) |
| C | it can be (532 or 531) does not matter which one | (depends on column_2) |
| A | it can be (300 or 302) does not matter which one | (depends on column_2) |
| ... | ........ | ... |
+---------+---------------------------------------------------------------+-----------------------+
So what I'm thinking is to group by each column and take the max or min value of column_3
(does not matter which one), but I failed to do that.
I'm sorry for the complex question, but can you help me? Thanks