text: CREATE TABLE a(col INTEGER);
  
  INSERT INTO a VALUES(1);
  INSERT INTO a VALUES(2);
  INSERT INTO a VALUES(3);
  INSERT INTO a VALUES(4);
  
  SELECT SUM(col) FROM a;
  
  SELECT SUM(cast(col as varchar(10))) FROM a;
  
  CREATE TABLE b (col VARCHAR(255));
  INSERT INTO b SELECT * FROM a;
  
  SELECT * FROM b ORDER BY col;
  
  SELECT SUM(b.col) FROM b ORDER BY 1;
  
  SELECT SUM(a.col), SUM(b.col), IF(SUM(a.col) = SUM(b.col),'ok','nok') FROM a, b WHERE a.col = b.col GROUP BY a.col, b.col ORDER by a.col, b.col;
  
  SELECT if ((SELECT SUM(b.col) FROM b) = (SELECT SUM(a.col) FROM a), 'ok', 'nok') FROM db_root;
  
  DROP TABLE a;
  
  CREATE TABLE c(col SMALLINT);
  
  INSERT INTO c SELECT * FROM b;
  
  SELECT if ((SELECT SUM(b.col) FROM b) = (SELECT SUM(c.col) FROM c), 'ok', 'nok') FROM db_root;
  
  DROP TABLE c;
  
  CREATE TABLE c(col BIGINT);
  
  INSERT INTO c SELECT * FROM b;
  
  SELECT if ((SELECT SUM(b.col) FROM b) = (SELECT SUM(c.col) FROM c), 'ok', 'nok') FROM db_root;
  
  DROP TABLE c;
  
  CREATE TABLE c(col NUMERIC(10,5));
  
  INSERT INTO c SELECT * FROM b;
  
  SELECT if ((SELECT SUM(b.col) FROM b) = (SELECT SUM(c.col) FROM c), 'ok', 'nok') FROM db_root;
  
  DROP TABLE c;
  
  CREATE TABLE c(col FLOAT);
  
  INSERT INTO c SELECT * FROM b;
  
  SELECT if ((SELECT SUM(b.col) FROM b) = (SELECT SUM(c.col) FROM c), 'ok', 'nok') FROM db_root;
  
  DROP TABLE c;
  
  CREATE TABLE c(col DOUBLE);
  
  INSERT INTO c SELECT * FROM b;
  
  SELECT if ((SELECT SUM(b.col) FROM b) = (SELECT SUM(c.col) FROM c), 'ok', 'nok') FROM db_root;
  
  DROP TABLE c;
  
  CREATE TABLE c(col MONETARY);
  
  INSERT INTO c SELECT * FROM b;
  
  SELECT if ((SELECT SUM(b.col) FROM b) = (SELECT SUM(c.col) FROM c), 'ok', 'nok') FROM db_root;
  
  DROP TABLE c;
  DROP TABLE b;
  
  CREATE TABLE a (col TIME);
  
  INSERT INTO a VALUES('12:00:01');
  INSERT INTO a VALUES('12:00:02');
  INSERT INTO a VALUES('12:00:03');
  
  SELECT SUM(col) FROM a ORDER BY 1;
  
  DROP TABLE a;
  
  CREATE TABLE a (col DATE);
  
  INSERT INTO a VALUES('2010-01-01');
  INSERT INTO a VALUES('2010-01-02');
  INSERT INTO a VALUES('2010-01-03');
  
  SELECT SUM(col) FROM a ORDER BY 1;
  
  DROP TABLE a;
  
  CREATE TABLE a (col DATETIME);
  
  INSERT INTO a VALUES('2010-01-01 12:00:00');
  INSERT INTO a VALUES('2010-01-02 12:00:01');
  INSERT INTO a VALUES('2010-01-03 12:00:02');
  
  SELECT SUM(col) FROM a ORDER BY 1;
  
  DROP TABLE a;
  
  CREATE TABLE a (col TIMESTAMP);
  
  INSERT INTO a VALUES('2010-01-01 12:00:00');
  INSERT INTO a VALUES('2010-01-02 12:00:01');
  INSERT INTO a VALUES('2010-01-03 12:00:02');
  
  SELECT SUM(col) FROM a ORDER BY 1;
  
  DROP TABLE a;
  
  CREATE TABLE a (col VARCHAR(255));
  
  INSERT INTO a VALUES('2010-01-01 12:00:00');
  INSERT INTO a VALUES('2010-01-02 12:00:01');
  INSERT INTO a VALUES('2010-01-03 12:00:02');
  
  SELECT SUM(col) FROM a ORDER BY 1;
  
  DROP TABLE a;
  
  CREATE TABLE a (col SET of INTEGER);
  
  INSERT INTO a VALUES({1,2,3});
  INSERT INTO a VALUES({1,2,4});
  INSERT INTO a VALUES({1,2,5});
  
  SELECT SUM(col) FROM a ORDER BY 1;
  
  DROP TABLE a;
  