For example look at the below query, it works fine in U2U builder but returns all records if we use the same in code.
SPQuery query = new SPQuery();
query.Query = "<Query><Where></Where></Query>"
Here is the Fix:
Remove the "<Query>" Tag and rewrite it
SPQuery query = new SPQuery();
query.Query = "<Where></Where>"