I am writing a program for amateur radio. Some callsigns will appear more than once in the data but the qsodate will be different. I only want the first occurrence of a call sign after a given date.
The query
select distinct 
  a.callsign, 
  a.SKCC_Number,
  a.qsodate,
  b.name,
  a.SPC,
  a.Band
from qso a, skccdata b
where SKCC_Number like '%[CTS]%'
  AND QSODate > = '2014-08-01'
  and b.callsign = a.callsign
order by a.QSODate
The problem:
Because contacts occur on different dates, I get all of the contacts - I have tried adding min(a.qsodate) to get only the first but then I run into all sorts of issues regarding grouping.
This query will be in a stored procedure, so creating temp tables or cursors will not be a problem.
 
     
     
    