Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.
SET @a = (select sum(col_a) from x where date <= '2001-01-01');
SET @b = (select sum(col_b) from x where date <= '2001-01-01');
SET @c = (select col_c from x where date <= '2001-01-01' order by date desc limit 1);
SET @total = @a+@b+@c;
SELECT @total;
select sum(Total) as complete_total from (
select colA as col, sum(colA) as Total from x where date <= '2001-01-01' group by colA
UNION
select colB as col, sum(colB) as Total from x where date <= '2001-01-01' group by colB
UNION
select some_other_column as col, max(colC) as Total from x where date <= '2001-01-01' group by some_other_column
) as tbl;
(select 'a' as col, sum(a) as Total from x where date <= '2001-01-01'
union
select 'b' as col, sum(b) as Total from x where date <= '2001-01-01'
union
select 'c' as col, sum(c) as Total from x where date < '2001-01-01' ) xyz