Fix bug in sql summary generation.