Title: 2.1 SQL Syntax Error
Last modified: August 18, 2016

---

# 2.1 SQL Syntax Error

 *  [randomgoodstuff](https://wordpress.org/support/users/randomgoodstuff/)
 * (@randomgoodstuff)
 * [19 years, 4 months ago](https://wordpress.org/support/topic/21-sql-syntax-error/)
 * WordPress database error: [You have an error in your SQL syntax; check the manual
   that corresponds to your MySQL server version for the right syntax to use near‘
   GROUP BY year(post_date), month(post_date), dayofmonth(post_date)’ at line 1]
   
   SELECT DISTINCT post_date FROM wp_posts LEFT JOIN wp_post2cat ON (wp_posts.ID
   = wp_post2cat.post_id) LEFT JOIN wp_categories ON (wp_post2cat.category_id = 
   wp_categories.cat_ID) WHERE 1=1 AND category_id IN (7) AND (post_type = ‘post’
   AND (post_status = ‘publish’ OR post_status = ‘private’)) GROUP BY wp_posts.ID
   GROUP BY year(post_date), month(post_date), dayofmonth(post_date)
 * I just updgraded to to 2.1 and daectivating the plugins won’t help

Viewing 1 replies (of 1 total)

 *  [ramyaharilal](https://wordpress.org/support/users/ramyaharilal/)
 * (@ramyaharilal)
 * [19 years, 4 months ago](https://wordpress.org/support/topic/21-sql-syntax-error/#post-510199)
 * can we count distinct column in mysql

Viewing 1 replies (of 1 total)

The topic ‘2.1 SQL Syntax Error’ is closed to new replies.

## Tags

 * [database](https://wordpress.org/support/topic-tag/database/)

 * In: [Installing WordPress](https://wordpress.org/support/forum/installation/)
 * 1 reply
 * 2 participants
 * Last reply from: [ramyaharilal](https://wordpress.org/support/users/ramyaharilal/)
 * Last activity: [19 years, 4 months ago](https://wordpress.org/support/topic/21-sql-syntax-error/#post-510199)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
