Dim sql As String = ""
sb.Remove(0, sb.Length)
sb.Append("SELECT Sdate,SUM(Sumsale) AS TotalSum ")
sb.Append("FROM SaleProduct ")
'-- sb.Append(" WHERE Sdate BETWEEN @StartDate AND @EndDate")
'-- หรือ
'-- sb.Apend(" WHERE Sdate = @DateToAll")
sb.Append("GROUP BY Sdate")
sql = sb.ToString()