I have used pgRouting to generated multiple many to many traffic routes different points of interest. I have used st_Dwithin to put a catchment area on the routing alogirthm, however the agg_cost(total_distance) in the table shows that some routes are still too long (for walking for example).

Is there a way to remove whole routes from the output table (i.e. path_seq 1...n) for routes where the agg_cost is too long for my analysis?

I need to show the whole for for my analysis, not to condense the output into a new table and remove rows where agg_cost >5km