Running MonetDB Database Server Toolkit v1.1 (Feb2013-SP6)
This query
select rowtype, min(zdate), max(zdate) , count(*)
from fdhista
group by rowtype
;
returns correct minimum and maximum dates for each rowtype.
rowtype L1 L2 L3
3 1970-12-31 2009-07-31 1664186
1 2003-02-24 2013-09-13 11649306
This query, over the same table
select min(zdate), max(zdate), count(*) from fdhista where rowtype=3;
seems to "ignore" the where clause, returning
L1 L2 L3
1970-12-31 2013-09-13 13313492
I haven't found a general sql precedent (yet) for that answer. Is this the expected response?
I was expecting this
L1 L2 L3
1970-12-31 2009-07-31 1664186
I tried similiar queries in Oracle and SQL Server and get back my expected response. Yet I find generic sql comments that support "ignoring" the where clause. Maybe this is a case of MonetDB's use of a specific SQL standard?