Hi everyone and good day.

I have two queries for this output:
Code:
+--------------+-------------+------------+--------+-------------+-------------------+
| application  | StartDate   | EndDate    | Number | Number days | Number for day    |
+--------------+-------------+------------+--------+-------------+-------------------+
| NULL         | 01/01/2011  | 26/06/2011 |  58348 |   176       | 332               |
| Report       | 01/01/2011  | 26/06/2011 |   6987 |   176       | 40                |
+--------------+-------------+------------+--------+-------------+-------------------+


+--------------+-------------+------------+--------+-------------+-------------------+
| application  | StartDate   | EndDate    | Number | Number days | Number for day    |
+--------------+-------------+------------+--------+-------------+-------------------+
| NULL         | 01/01/2012  | 26/06/2012 |  56937 |   177       | 322               |
| Report       | 01/01/2012  | 26/06/2012 |   6314 |   177       | 36                |
+--------------+-------------+------------+--------+-------------+-------------------+
I need:
  1. Replace in the output NULL with `Total` alias;
  2. Automatically calculate this formula:
    Code:
    ( Number(value of 2th query) - Number(value of 1th query) ) / Number(value of 2th query)
    e.g.: ( 56937 - 58348 ) / 58348 ====> -0.0241


How to with only query?
Many thanks for your help.
Code:
mysql> SELECT
	*
FROM
	(
		SELECT
			application,
			DATE_FORMAT(
				MAKEDATE(YEAR(CURDATE()) - 1, 1),
				'%d/%m/%Y'
			) `StartDate`,
			DATE_FORMAT(
				DATE_ADD(CURDATE(), INTERVAL - 1 YEAR),
				'%d/%m/%Y'
			) `EndDate`,
			COUNT(*) `Number`,
			DATEDIFF(
				DATE_ADD(CURDATE(), INTERVAL - 1 YEAR),
				MAKEDATE(YEAR(CURDATE()) - 1, 1)
			) `Number days`,
			FORMAT(
				(
					COUNT(*) / DATEDIFF(
						DATE_ADD(CURDATE(), INTERVAL - 1 YEAR),
						MAKEDATE(YEAR(CURDATE()) - 1, 1)
					)
				),
				0
			) `Number for day`
		FROM
			tbl_backup
		WHERE
			1
		AND application NOT LIKE 'home page'
		AND `myDate` BETWEEN MAKEDATE(YEAR(CURDATE()) - 1, 1)
		AND DATE_ADD(CURDATE(), INTERVAL - 1 YEAR)
		GROUP BY
			application WITH ROLLUP
	) t
ORDER BY
	t.`Number` DESC
LIMIT 1;



SELECT
	*
FROM
	(
		SELECT
			application,
			DATE_FORMAT(
				MAKEDATE(YEAR(CURDATE()), 1),
				'%d/%m/%Y'
			) `StartDate`,
			DATE_FORMAT(CURDATE(), '%d/%m/%Y') `EndDate`,
			COUNT(*) `Number`,
			DATEDIFF(
				CURDATE(),
				MAKEDATE(YEAR(CURDATE()), 1)
			) `Number days`,
			FORMAT(
				(
					COUNT(*) / DATEDIFF(
						CURDATE(),
						MAKEDATE(YEAR(CURDATE()), 1)
					)
				),
				0
			) `Number for day`
		FROM
			tbl_backup
		WHERE
			1
		AND application NOT LIKE 'home page'
		AND `myDate` BETWEEN MAKEDATE(YEAR(CURDATE()), 1)
		AND CURDATE()
		GROUP BY
			application WITH ROLLUP
	) t
ORDER BY
	t.`Number` DESC
LIMIT 1;