If you only want those four values ("from the third column") then what values from the
other columns do you want to come with them (if any)?
The simplest solution is:
select distinct src
from cdr ;
+--------------+
| src |
+--------------+
| +48601513000 |
| +48609945000 |
| 500478000 |
| 609945000 |
+--------------+
But that's
all you get.
If that's all you need, then that's great. Job Done.
If not, then you need to work out which of the other values to return.
For example, given these three records for a given src value:
select * from cdr
where ...
+---------------------+--------------+----------+
| calldate | src | duration |
+---------------------+--------------+----------+
| 2023-02-02 13:53:23 | +48601513000 | 4 |
| 2023-02-02 13:54:14 | +48601513000 | 7 |
| 2023-02-02 13:54:15 | +48601513000 | 6 |
+---------------------+--------------+----------+
As well as the src value, do you want:
- the first date,
- the last date,
- the shortest call duration,
- the longest call duration,
- the total call time,
- the average call time,
- something else entirely?
There are SQL
aggregate functions that will cater to most, if not all, of your needs.
Regards, Phill W.