Not "any time", only when the visitation order changes. UNION ALL evaluates/groups from left to right. You could use a "sort order" table CREATE TABLE sort_order (Id INTEGER, name TEXT UNIQUE); INSERT INTO sort_order VALUES (1, 'Minimum'),(2, 'Maximum'), (3, 'Today'); and then SELECT name FROM sort_order ORDER BY Id;