Dim rs As ResultSet = B4XPages.MainPage.SQL.ExecQuery2("SELECT DISTINCT Names,Class || Stream As CS,Subject,Total As Score,grade as Grade,Term,Years FROM Academics WHERE grade>=0 and Phone = ? ORDER BY Grade ASC, Total DESC;", Array As String(Phonet))
Do While rs.NextRow
Dim row(6) As Object
row(0) = rs.GetString("Names")
row(1) = rs.GetString("CS")
row(2) = rs.GetString("Subject")
row(3) = rs.GetString("Score")
row(4) = rs.GetString("Grade")
row(5) = rs.GetString("Term")
data.Add(row)
Loop
rs.Close
B4XTable2.SetData(data)