mkaplan

Untitled

Apr 13th, 2011
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MySQL 0.51 KB | None | 0 0
  1. SELECT message.m_id, message.p_id, message.m_text, avg(rating)
  2. FROM
  3. (
  4. SELECT message.m_id, message.p_id, message.m_text
  5.             FROM message inner join about
  6.             ON message.m_id = about.m_id
  7.             WHERE m_type = 0 AND about.main = 'hi'
  8.  
  9. ) AS tmp1
  10. LEFT OUTER JOIN rate AS tmp2
  11. GROUP BY message.m_id
  12.  
  13. #error: #1064 - 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 message.m_id LIMIT 0, 30' at line 10
Advertisement
Add Comment
Please, Sign In to add comment