
CREATE VIEW RandomDigit as
  SELECT abs(random())%10 AS n
  FROM (SELECT 1);

CREATE VIEW RandomDie as
  SELECT 1+abs(random())%6 AS n
  FROM (SELECT 1);
