I'm working with my first CartoDB.js application.
I created a visualization on the app using
cartodb.createVis('map', visjson_url, opts);
The app has two layers, base map and data layer. the data layer has five sublayers. Each sublayer represents data in an independent table (i.e., sublayer1 represents table1, etc.).
I run queries using this statement:
The problem is that I get an error message saying "Bad Request" if query_str involves join operations between some of the tables (e.g., spatial join between table1 and table3). If query_str is related to only one table (without joins),
setSQL() above works fine.
How can I display join results using
setSQL() that involves join operation between two or more sublayers?