added device group function in sqlite3 for plotting graphs and rendering cache data