code: func (db *SQLDB) getSelectQuery(table *types.SQLTable, height uint64) (string, error) {
  
  	fields := ""
  
  	for _, tableColumn := range table.Columns {
  		if fields != "" {
  			fields += ", "
  		}
  		fields += db.DBAdapter.SecureName(tableColumn.Name)
  	}
  
  	if fields == "" {
  		return "", errors.New("error table does not contain any fields")
  	}
  
  	query := db.DBAdapter.SelectRowQuery(table.Name, fields, strconv.FormatUint(height, 10))
  	return query, nil
  }
docs: // getSelectQuery builds a select query for a specific SQL table and a given block