I want to display query result inside column 'Total Sent'. How to do that?
This is my query: SELECT COUNT(webservice_resp.id) AS leeds_count_sent, webservice_resp.id_campanya FROM usuarios_leedia JOIN webservice_resp ON usuarios_leedia.id = webservice_resp.id_usuario WHERE webservice_resp.estado_ok = 1 AND webservice_resp.id_campanya = {{ campanya_id }}
I want to replace {{ campanya_id }} with currentRow from the table.
@ScottR I want to get Total Sent value using each ID listed in the table.
So I want my query run in each row like this:
ID 20 = ...WHERE webservice_resp.id_campanya = 20
ID 206 = ... WHERE webservice_resp.id_campanya = 206
etc...
And then display each of them in corresponding row of TotalSent column.
Hey @yeftanma! Just to make sure I’m following 100% - were you able to write all the logic into a single query? Do you need help writing the query? If so, more visibility into the tables you are joining would help! Also, if you’ve already tried rewriting it after ScottR’s suggestion, feel free to post the new query and we can go from there!
Otherwise, if you wanted 2 separate queries, here is a helpful doc to check out. Two helpful callouts would be to:
Change query1 to your query name
Change rows original_query.data.id (to get an array of all the IDs)