Any subquery returns a collection, so try the following:

select case when (select value count (country) from Tweets1)[0] > 50  THEN
"true" ELSE "false" END;

On Mon, May 15, 2017 at 2:16 PM, Vignesh Raghunathan <
[email protected]> wrote:

> Hi Steven,
>
> Could you try indexing the result of the second 'select value count...'
> statement?
>
> > use experiments
> > select count (country) from Tweets1;
> > select case when (select value count (country) from Tweets1)[0] > 50
> THEN
> > "true" ELSE "false" END;
>
>
>
> Thanks,
> Vignesh
>
> > On May 15, 2017, at 5:09 PM, Steven Jacobs <[email protected]> wrote:
> >
> > Hi all,
> > I'm trying to understand the capabilities of the "case" that we have in
> > SQL++. I tried the following queries and the two results don't seem to
> make
> > sense. Am I missing something?
> >
> > SQL++:
> > use experiments
> > select count (country) from Tweets1;
> > select case when (select value count (country) from Tweets1) > 50  THEN
> > "true" ELSE "false" END;
> >
> > RESULTS:
> >
> > { "$1": 36297735 }
> >
> > { "$1": "false" }
> >
> > Thanks,
> > Steven
>

Reply via email to