Just to finish
I need to work out the following:-
(1) no. records in the subset where another field's value is >=0
(2) the sum of the contents of that field in those records
(3) no. records in the subset where the value of the same field above is < 0
(i.e. negative)
(4) the
Many thanks
Bob M
--
View this message in context:
http://apache-database.10148.n7.nabble.com/pulling-out-a-subset-of-records-tp144942p144948.html
Sent from the Apache Derby Users mailing list archive at Nabble.com.
as I said before, you should have a look at an SQL tutorial for aggregation
functions (eg, http://www.w3schools.com/sql/sql_functions.asp, hint: use
group by )
On Tue, Oct 20, 2015 at 10:23 AM, Bob M wrote:
> Just to finish
>
> I need to work out
Hi Marco
Am I getting any closer :)
rs = s.executeQuery("SELECT Class1_predicted, Class2_predicted,
Class3_predicted, Class4_predicted, Class5_predicted, Class6_predicted,
Class7_predicted, Class_predicted,"
+ "aggregate_function (SUM (PROFIT_LOSS)) "
+ "FROM USD_JPY_S "
+ "WHERE