I've just came across this old thread and checked, that problem reported in may still occurs.
We have now Vectorwise Version VW 2.5.1 (a64.lnx/162)NPTL
First I wanted to run this query:
Code:
select count(*)
from (
select day(datetime), count(distinct user_sk) x
from login_fact
where datetime between '2012-03-01 00:00:00' and '2012-03-31 23:59:59'
group by 1) c
\g
But it gives:
Code:
E_US0C1C Query requires too many range variables.
(Thu Sep 6 05:47:44 2012)
Which is also a bit strange, but...
Secondly, I've tried this:
Code:
select count(*)
from (
select day(datetime), count(distinct user_sk) x
from login_201203_fact
where datetime between '2012-03-01 00:00:00' and '2012-03-31 23:59:59'
group by 1) c
\g
with data from march only.
The result is:
Code:
+----------------------+
|col1 |
+----------------------+
| 2655309|
+----------------------+
(1 row)
continue
* select count(distinct day) from (select day(datetime) as day, count(distinct user_sk) x from login_201203_fact where datetime between '2012-03-01 00:00:00' and '2012-03-31 23:59:59' group by 1) c\g
Executing . . .
+----------------------+
|col1 |
+----------------------+
| 31|
+----------------------+
(1 row)
continue
And I'm still a bit unsatisfied with it.