Report generates same information every time its ran

I have a transaction group pulling information into a table and a report that generates after the process has been completed. The issue that i have is the report has the same data in the report every day and i know the data is changing i can see it in the PLC. Here is what i have I’m also not great at SQL I’m just learning ignition as well.

SELECT Line3CIP.Step_Number AS [Step Number],
Avg(Line3CIP.[Return Temp]) AS [Avg_Return Temp],
Avg(Line3CIP.Conductivity) AS Avg_Conductivity,
Avg(Line3CIP.[Flow Rate]) AS [Avg_Flow Rate],
Min(Line3CIP.Conductivity) AS Min_Conductivity,
Min(Line3CIP.[Flow Rate]) AS [Min_Flow Rate],
Max(Line3CIP.Conductivity) AS Max_Conductivity,
Max(Line3CIP.[Flow Rate]) AS [Max_Flow Rate],
Max(Line3CIP.[STEP Timer]) AS [Max_STEP Timer]
FROM Line3CIP
GROUP BY Line3CIP.Step_Number
ORDER BY [Step Number]

You need a WHERE clause that limits the returned data by the timestamp column versus the start and end date parameters.

could you give me an example?

FROM Line3CIP
WHERE [t_stamp] BETWEEN ? AND ?
GROUP BY Line3CIP.Step_Number
ORDER BY [Step Number]

Placing the question marks in the report SQL will open parameter boxes for them. Select the report’s start date and end date parameters.

can i use a tag like when a process is active for a parameter for example
{[default]Header/Header_1_/Step_Number.value} > 1

You can’t use tag syntax in SQL. Your SQL can reference anything you recorded for each sample, which appears to include that step number. However, presuming your step numbers repeat each day means you also have to filter by date/time.