Ignore last group when grouping by time

I running into basically this issue.

Whenever we do a select sum(foo) from bar group by time(10m), the last group reported has lower numbers because it’s not complete yet. If you keep running the same query over and over, the value for the last group will increase until it gets to the real value, until now() is at a round 10 minute mark, and then it’ll go down to 0 again.
Is there a query I could use to filter out all data points between the end of the last round timestamp used by group by and now()?

Similarly, it would probably be helpful to discard all data points between any minimum timestamp in the WHERE clause and the start of the first round timestamp used by group by. Basically, filter out any partial groups.