added query to MySQL backend