--Query 11: "Create table of minimum delay across whole day per PathSpec"

--MinimumDelay: The mininmum delay for all NodePairId in a given day

WITH \
MinimumDelay(PathSpec, DayMin) as \
( \
SELECT  t.NodePairId as "PathSpec", \
	min(t.delay) as "DayMin" \
FROM    Surveyor.Times t \
WHERE   t.delay != -1 AND \
        t.start BETWEEN (954633600) AND (954633600 + 86400 - 1) \
GROUP BY	t.NodePairId \
) \
SELECT	* \
FROM	MinimumDelay md \
ORDER BY	md.PathSpec
