diff --git a/src/api/sql.js b/src/api/sql.js
index <HASH>..<HASH> 100644
--- a/src/api/sql.js
+++ b/src/api/sql.js
@@ -3,6 +3,9 @@
   var root = this;
 
   function SQL(options) {
+    if(cdb === this || window === this) {
+      return new SQL(options);
+    }
     if(!options.user) {
       throw new Error("user should be provided");
     }
added the possibility of calling cartodb.SQL without new