Q:

I Want to get the total of row using mysql query

i want to get the total sum of row in one query
(SELECT 
SUM(vatPrivate) AS vatPrivate,
SUM(vatGovernment) AS vatGovernment,
SUM(vatZero) AS vatZero,
SUM(vatExempt) AS vatExempt,
SUM(vatPrivate+vatGovernment+vatZero+vatExempt) as VatTotal
FROM transaction gl
WHERE (gl.entryDate) BETWEEN '2019-01-01' AND '2020-01-31')

A:

Change 
SUM(vatPrivate+vatGovernment+vatZero+vatExempt)

To
COALESCE(SUM(vatPrivate),0) + COALESCE(SUM(vatGovernment),0) +COALESCE(SUM(vatZero),0) + COALESCE(SUM(vatExempt),0) as VatTotal

Note: NULL + Some Value = NULL so if any of the sum is coming null and you are not using COALESCE, you will get null as the output. 
Your final query should look like following
SELECT 
SUM(vatPrivate) AS vatPrivate,
SUM(vatGovernment) AS vatGovernment,
SUM(vatZero) AS vatZero,
SUM(vatExempt) AS vatExempt,
COALESCE(SUM(vatPrivate),0) + COALESCE(SUM(vatGovernment),0) +COALESCE(SUM(vatZero),0) + COALESCE(SUM(vatExempt),0) as VatTotal
FROM transaction gl
WHERE (gl.entryDate) BETWEEN '2019-01-01' AND '2020-01-31'

