For those who do not know, there is a tool to generate your CAML queries.
For SharePoint 2003 and 2007 we had the CAML Builder tool, you can it find here: http://www.u2u.be/res/tools/camlquerybuilder.aspx
Recently there was a new version of the CAML Builder targeting SharePoint 2010 and SharePoint Online: CAML Designer.
You can find all information here: http://karinebosch.wordpress.com/my-articles/caml-designer/
If you have to create CAML queries, do not hesitate one second!