fix sql syntax bug

An error occurred while viewing summary page.
fix sql syntax bug.