Single Query to Count Data from Multiple Table Mysql

Single Query to Count Data from Multiple Table Mysql

I have tables that contain same field, for example:

I have tables that contain same field, for example:

p_central_ticket        p_south_ticket             p_west_ticket 
=====================================================================
 - t_id                  - t_id                     - t_id
 - t_req_type            - t_req_type               - t_req_type  
 - t_status              - t_status                 - t_status

And i have one table :

m_event_type
=============
- ev_type
- ev_activity

My current query :

SELECT ev_activity AS Activity, COUNT( * ) AS Total
  FROM m_event_type
LEFT JOIN p_central_ticket ON p_central_ticket.t_req_type = m_event_type.ev_type
  WHERE t_status =9
GROUP BY ev_activity

Output from query above:

My question is, how should i do, if i want to total count from 3 tables above.

(For Example Activity Change Request total 18000, count from p_central_ticket + p_south_ticket + p_west_ticket) etc.

Thanks...

sql mysql

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

Introduction to Structured Query Language SQL pdf

SQL stands for Structured Query Language. SQL is a scripting language expected to store, control, and inquiry information put away in social databases. The main manifestation of SQL showed up in 1974, when a gathering in IBM built up the principal model of a social database. The primary business social database was discharged by Relational Software later turning out to be Oracle.

Introduction to Structured Query Language SQL pdf

SQL stands for Structured Query Language. SQL is a scripting language expected to store, control, and inquiry information put away in social databases. The main manifestation of SQL showed up in 1974, when a gathering in IBM built up the principal model of a social database. The primary business social database was discharged by Relational Software later turning out to be Oracle.

Best MySQL DigitalOcean Performance – ScaleGrid vs. DigitalOcean Managed Databases

Compare ScaleGrid MySQL vs. DigitalOcean Managed Databases - See which offers the best MySQL throughput, latency, and pricing on DigitalOcean across workloads.

Welcome Back the T-SQL Debugger with SQL Complete – SQL Debugger

Debug SQL stored procedures and develop your SQL database project with dbForge SQL Complete, a new add-in for Visual Studio and SSMS. When you develop large chunks of T-SQL code with the help of the SQL Server Management Studio tool, it is essential to test the “Live” behavior of your code by making sure that each small piece of code works fine and being able to allocate any error message that may cause a failure within that code.

SQL LOWER Function Example | Lower() In MySQL and SQL Server

SQL LOWER Function Example | Lower() In MySQL and SQL Server. The SQL LOWER function converts all the characters in a string into lowercase.