I'm actually not even sure if it's possible, but I'm just trying my luck as I've tried around with stuff for a bit, but can't really grasp it.
Image of my table
What I want: I want the gpID once, and I want it to be at the date it happened first. For example, gpID 1 and 2 were finished by pID 1 on the 28th of August. I don't want the gpID 1 and 2 to be included in the result for the other dates. I tried DISTINCT, which at least gets rid of the duplicates in each row, however, it won't really solve my problem.
SELECT
GROUP_CONCAT( DISTINCT gpID) AS gpID,
pID,
score,
FROM_UNIXTIME(DATE, '%Y %M %D') AS DATE
FROM
points
where pID = 1
group by FROM_UNIXTIME(date, '%Y %M %D')
which results in
gpID pID score DATE
1,2,3 1 125220 2019 August 28th
1,2,3,4 1 30000 2019 September 16th
Is there any way to get rid of gpID 1,2,3 for all dates after 28th of August?