SQl query to create a report based on multiple relational tables
This can be written as a single query.
I have guessed the last line.

SELECT
   MONTH(a.Created) AS `Month`
 , SUM(a.totalValue) as totalValue  -- Total amount in $
 , COUNT(a.id) as totalSales
 , SUM(CASE WHEN a.id_delivery = 1 AND b.status &gt;= 3 AND b.status &lt;= 6 THEN 1 END) as totalDelivery
 , SUM(CASE WHEN a.id_delivery = 2 AND b.status &gt;= 3 AND b.status &lt;= 6 THEN 1 END) as totalTaken
 , SUM(CASE WHEN a.id_payment = 1 AND b.status &gt;= 3 AND b.status &lt;= 6 THEN 1 END) as totalTaken
 , SUM(CASE WHEN a.id_payment = 2 AND b.status &gt;= 3 AND b.status &lt;= 6 THEN 1 END) as totalCard
 , SUM(CASE WHEN a.id_payment = 3 AND b.status &gt;= 3 AND b.status &lt;= 6 THEN 1 END) as totalMoney
 , SUM(CASE WHEN b.status IN (7, 8) THEN 1 END) as totalCanceled
FROM order a, orderStatus b
WHERE YEAR(a.Created) = ?
 AND b.id = a.id_status
GROUP BY MONTH(a.Created)
ORDER BY 1