MySQL Query
Budget: $10 – $30 USD
I have a query that returns records with 2 or more values under 3 at the same time. I want to adapt it so that it returns the same records and also all subsequent records with the same RaceDetails.
An extract of the table is attached and the query is:
SELECT inplaydata.InplayData.*
FROM inplaydata.InplayData
WHERE inplaydata.InplayData.BP < 3 and
exists (select 1
from inplaydata.InplayData as t2
where t2.time = inplaydata.InplayData.time and t2.RaceDetails = inplaydata.InplayData.RaceDetails and
t2.BP < 3 and t2.SelectionName <> inplaydata.InplayData.SelectionName
);
An extract of the table is attached and the query is:
SELECT inplaydata.InplayData.*
FROM inplaydata.InplayData
WHERE inplaydata.InplayData.BP < 3 and
exists (select 1
from inplaydata.InplayData as t2
where t2.time = inplaydata.InplayData.time and t2.RaceDetails = inplaydata.InplayData.RaceDetails and
t2.BP < 3 and t2.SelectionName <> inplaydata.InplayData.SelectionName
);