On Tue, Apr 23, 2013 at 11:28 AM, Stefan Manegold <Stefan.Manegold@cwi.nl> wrote:
"wrd" is an internal MonetDB type.

Which SQL type did you use in you your create table statement?
I.e., what does
        \d x07
say about the type of column rx_cso_num ?


Sorry about that -- it's a BIGINT
 
Or did you create the table as result of a SQL query (as you suggest?)?

Yes, I did..
 
Then, the clause(s) of the query that determine column rx_cso_num as well as
the (SQL) types of the related columns of the source table (if any) would be
useful.


..inside the clause:

COUNT( CASE WHEN MY_CODE IN ('01','02') THEN UNIQUE_ROW_IDENTIFIER END ) as rx_cso_num

both UNIQUE_ROW_IDENTIFIER and MY_CODE are VARCHAR(255).  I hope that's what you're asking for?
 

 
Also, could you run the failing queries in mclient prefixed with "explain"
and "trace" (i.e., run it twice), and send us the output (in case of
"trace", only the second result set is of interest).



I ran trace and explain in front of all five queries.  Of those ten queries, the four not shown print much more detail (that would be more helpful for troubleshooting).. but I don't understand the output, so I'm not comfortable with sending it.  I'm sorry that these six results aren't terribly helpful..

sql>trace select median(rx_cso_num) from x07;
overflow in conversion of 133 to bte.
sql>trace select stddev(rx_cso_num) from x07;
SELECT: no such unary operator 'stddev(wrd)'
sql>explain select stddev(rx_cso_num) from x07;
SELECT: no such unary operator 'stddev(wrd)'
sql>trace select stddev_pop(rx_cso_num) from x07;
SELECT: no such unary operator 'stddev_pop(wrd)'
sql>explain select stddev_pop(rx_cso_num) from x07;
SELECT: no such unary operator 'stddev_pop(wrd)'
sql>trace select prod(rx_cso_num) from x07;
overflow in conversion of 133 to bte.