Dear remi,
your question is a general SQL question and not a MonetDB specific. MonetDB sql frontend follows the SQL standard so any SQL query that works in any DBMS will work in the same way in MonetDB too.
If you have questions on how to formulate correct queries in SQL I would advice you to use one of the many SQL references available in the web.
On the other hand, if you ran a correct SQL query against monetdb and you got an error or incorrect results, meaning a possible bug, then please let us know the error / output of MonetDB and we will help you.