This:
outputs following:
Now I want to apply count function on above table, for that I executed following query.
select count(date1) from (
select date1 from tmp where
current_date > date1
);
And got this error:
Error code 20000, SQL state 42X01: Syntax error: Encountered "" at line 4, column 1.
Note: I am using Java DB
Sub query usually needs an alias, try
select count(date1) from (
select date1 from tmp where
current_date > date1
) a ;