Removing first & last data points

Is there any way to clip the first and / or last data points from a time series / table?

I’m querying data from InfluxDB via FlightSQL / Arrow SQL and aggregating period host stats by clusters of hosts. As each host is reporting at a different point in the reporting interval, it’s often the case that the first and last intervals, which has already been time boxed from the grafana time boundaries, do not contain a data point for every host in the cluster, meaning when we add up their, say, total memory usage, it often drops off massively at each end, making a graph useless.

Anyway to clear up this data in SQL or through a Transformation or such to only have the middle 99% of data points or something?

I would use aggregation, e. g. avg for last 5min, if all devices reports data every 5min.

Yes, but the time filter removes some data points in the first and last windows due to the time boundary it initially filters the data by.

Use time shift on the panel level, so that incomplete time window, will be excluded from selected relative dashboard time range.