group gems mysql and sqlite3