Finding, but not deleting, duplicates from log

2 posts / 0 new
Last post
oh1kh
Finding, but not deleting, duplicates from log

Cqrlog has option to remove duplicates from log. "Qso list/File/Remove dupes from the log"
But sometimes you may have only need to seek duplicates without removing them right away.

For this you can use command "mysql" using command terminal. It might be better than "QSO list/Filter/SQL console", but both ways will work.

If you have selected "Save log data to local machine" you have to start Cqrlog first and look what log number you want to use.
When Cqrlog is running open command terminal and give:

mysql -S ~/.config/cqrlog/database/sock cqrlog003 (in this case I want to look log number 3)

Using command terminal it is easy to use copy/paste found from the top menu of terminal window.

Paint and copy this one long line and paste it to command terminal once you have got Mysql prompt:

select qsodate,count(qsodate),time_on,count(time_on),callsign, count(callsign),mode, count(mode),band,count(band) from cqrlog_main group by qsodate,time_on,callsign,mode,band having count(qsodate)>1 and count(time_on)>1 and count(callsign)>1 and count(mode)>1 and count(band)>1;

From my 15000 qsos log I found one duplicate qso.

Let's see the long mysql command line in more human readable form. Painting below, copy and paste to command terminal's mysql will also work as it can handle multiple line commands as long as the last character is ";"

select
qsodate,count(qsodate),
time_on,count(time_on),
callsign, count(callsign),
mode, count(mode),
band,count(band)
from
cqrlog_main
group by
qsodate,
time_on,
callsign,
mode,
band
having
count(qsodate)>1 and
count(time_on)>1 and
count(callsign)>1 and
count(mode)>1 and
count(band)>1;

If you want to find qsos with same station, same band, same mode, same day, but regardless the qso time you can leave all "time_on" parts away:

select qsodate,count(qsodate),callsign, count(callsign),mode, count(mode),band,count(band) from cqrlog_main group by qsodate,callsign,mode,band having count(qsodate)>1 and count(callsign)>1 and count(mode)>1 and count(band)>1;

Human readable form:

select
qsodate,count(qsodate),
callsign, count(callsign),
mode, count(mode),
band,count(band)
from
cqrlog_main
group by
qsodate,
callsign,
mode,
band
having
count(qsodate)>1 and
count(callsign)>1 and
count(mode)>1 and
count(band)>1;

With this command I found 73 qsos from same log.

After having results you can check callsigns you are interested in via Cqrlog's "QSO list/File/Search" (Ctrl+F) using the callsigns. That is quicker way than making a filter by callsign.
From my log I found interesting qso entries having same day, but slightly different time_on values.

Adding or removing columns same way as above with "time_on" you can specify your query suitable for your needs.
You can get the list of all qso record columns with mysql command:

show columns from cqrlog_main;

gxdfhdjhfgjh (not verified)
psl

Borrowers can start making qualifying payments towards PSLF shortly after graduating, allowing them to potentially qualify for loan forgiveness sooner than with other forgiveness programs that require longer repayment periods https://sonidailysports.com/how-to-watch-psl-live-in-uae-psl-live/. This early qualification feature can be advantageous for borrowers looking to address their student loan debt more quickly.