My query is giving me the sum of col_balance
but I want the last inserted COL_BALANCE value by a particular (missing word). It must be something like:
select COL_BALANCE from TABLE_NAME2 where name =(select col_bal from query where count is count -1 )
String selectQuery = " SELECT "+"sum(" + COL_BALANCE + ")"+ " FROM " + TABLE_NAME2 + " WHERE " + COL_CUST_NAME + "= '" + name + "';";