B4XTable1.AddColumn("Red", B4XTable1.COLUMN_TYPE_Text)
B4XTable1.AddColumn("Green", B4XTable1.COLUMN_TYPE_TEXT)
B4XTable1.AddColumn("Blue", B4XTable1.COLUMN_TYPE_TEXT)
Dim Data As List
Data.Initialize
Dim rs As ResultSet = sql.ExecQuery("SELECT sum(Red) as Red, sum(Green) as Green, sum(Blue) as Blue FROM carryforward")
Do While rs.NextRow
Dim row(2) As Object
row(0) = rs.GetString("Red")
row(1) = rs.GetString("Green")
row(2) = rs.GetString("Blue")
Data.Add(row)
Loop
rs.Close
Dim rs As ResultSet = sql.ExecQuery("SELECT Red, Green, Blue, FROM present")
Do While rs.NextRow
Dim row(2) As Object
row(0) = rs.GetString("Red")
row(1) = rs.GetString("Green")
row(2) = rs.GetString("Blue")
Data.Add(row)
Loop
rs.Close
B4XTable1.SetData(Data)