the TSQG with database quiz selection