configure jdbc binder- how to create multiple query in "SQL SELECT Query"

Confluence User - 03 Dec, 2020

Good day to all master, i want to ask about creating multiple query in SQL SELECT Query.

now i just using this script  SELECT COUNT(*) AS id_totalsubmitted FROM app_fd_task_submission WHERE c_field01_approval_radio ='Submitted'; to show out the total, please refer the picture.

this script only working for one field (Train Inspection Submitted).

I want to use  SELECT COUNT(*) AS id_totalapproved FROM app_fd_task_submission WHERE c_field01_approval_radio ='Approved'; to show the data in field (Train Inspection Approved).

How to separate this two query? using semi colon ; is not working.

TQ so much to all expert...





database;forms;query;multiplequery

2


03 Dec, 2020
confluenceUser
confluenceUser

Hi,

I would suggest you use the section load/store binder instead of the form. As for the query, it looks like it's getting from the same table and you could retrieve all the values in a single query. 

After some googling, I was able to find the following for your reference: 

mysql - Grouping based on the status, then count its product and the total based on its category ID - Database Administrators Stack Exchange

sql - Count all rows by status - Stack Overflow


04 Dec, 2020
confluenceUser
confluenceUser

Hi sir,

Thanks for your idea. 

RELATED QUESTIONS

Your answer


To answer a question you'll need an account.

Print