More work done in sql.py
Print groups