To get count from 2 tables on specific conditions

Hi everyone ,

Need to fetch from database.
I have issue with combining the query for getting count from 2 tables… i have 2 tables, from table1 i need to take user id as referrence and take the count from both table. I will keep the attachments please refer and let me know.table 3 is result. I have written query also but i need it as single query. If nothing matching it should be taken as zero.please help me.

Could anyone please help me the query

Try to filter the data table with Filter Data Table and get the row count of the filtered data table using DataTableName.Rows.Count

Actually these are tables that are present in database… so i need a query which may result as table 3. For reference i have given in Excel.if u see the table 3 i have given query how to add the count but i need it in single query is that possible?

Could anyone help on this… Assme that these tables are there in db …

Hello Bhavana, :smiley:

Please, look my solution and tell me if it helps you…

Main.xaml (7.1 KB)

I couldn’t get the output as above.