Window Function - an old SQL standard that is now available in MySQL

Code
-- tested with MariaDB 10.2, MySQL 8.0
-- Other RDBMS already know Window Functions for years

SELECT name, status, date, 
  SUM(price) OVER (PARTITION BY name) as price_name_sum,
  SUM(price) OVER (PARTITION BY date) as price_date_sum
  FROM history WHERE status = 1 AND date BETWEEN '2015-01-01' AND '2015-04-30'
  ORDER BY date, name;
Result
namestatusdateprice_name_sumprice_date_sum
baz12015-01-02 00:00:0015580.4850201614.485820
coffee12015-01-02 00:00:0011318.0220501614.485820
qux12015-01-02 00:00:008692.2376501614.485820
foo12015-01-04 00:00:009499.713070447.617910
foo12015-01-05 00:00:009499.713070806.781750
quux12015-01-05 00:00:0015543.947200806.781750
baz12015-01-06 00:00:0015580.4850201173.386860
budgie12015-01-06 00:00:0012117.4157001173.386860
foo12015-01-06 00:00:009499.7130701173.386860
bar12015-01-07 00:00:006224.9229901550.231380
baz12015-01-07 00:00:0015580.4850201550.231380
quux12015-01-07 00:00:0015543.9472001550.231380
quux12015-01-08 00:00:0015543.94720043.043040
baz12015-01-10 00:00:0015580.485020721.507360
coffee12015-01-11 00:00:0011318.022050858.344090
foo12015-01-11 00:00:009499.713070858.344090
baz12015-01-12 00:00:0015580.485020230.571160
baz12015-01-14 00:00:0015580.485020987.128940
bar12015-01-15 00:00:006224.9229901028.040530
budgie12015-01-15 00:00:0012117.4157001028.040530
baz12015-01-16 00:00:0015580.485020802.564650
budgie12015-01-16 00:00:0012117.415700802.564650
quux12015-01-16 00:00:0015543.947200802.564650
budgie12015-01-19 00:00:0012117.415700212.390520
baz12015-01-20 00:00:0015580.485020976.670860
budgie12015-01-20 00:00:0012117.415700976.670860
quux12015-01-21 00:00:0015543.94720099.940590
bar12015-01-22 00:00:006224.922990209.280850
baz12015-01-23 00:00:0015580.4850201530.191290
foo12015-01-23 00:00:009499.7130701530.191290
baz12015-01-24 00:00:0015580.4850202250.339800
budgie12015-01-24 00:00:0012117.4157002250.339800
quux12015-01-24 00:00:0015543.9472002250.339800
qux12015-01-24 00:00:008692.2376502250.339800
baz12015-01-25 00:00:0015580.4850201698.625640
budgie12015-01-25 00:00:0012117.4157001698.625640
coffee12015-01-25 00:00:0011318.0220501698.625640
qux12015-01-25 00:00:008692.2376501698.625640
budgie12015-01-26 00:00:0012117.415700968.716570
budgie12015-01-27 00:00:0012117.415700634.607040
quux12015-01-27 00:00:0015543.947200634.607040
qux12015-01-27 00:00:008692.237650634.607040
coffee12015-01-28 00:00:0011318.0220501555.946450
quux12015-01-28 00:00:0015543.9472001555.946450
bar12015-01-29 00:00:006224.922990458.901930
foo12015-01-29 00:00:009499.713070458.901930
quux12015-01-30 00:00:0015543.947200209.831860
quux12015-01-31 00:00:0015543.947200476.337190
bar12015-02-01 00:00:006224.922990996.353310
baz12015-02-01 00:00:0015580.485020996.353310
budgie12015-02-01 00:00:0012117.415700996.353310
quux12015-02-02 00:00:0015543.947200348.768090
bar12015-02-03 00:00:006224.922990null
coffee12015-02-05 00:00:0011318.022050571.148730
bar12015-02-06 00:00:006224.9229901808.248080
foo12015-02-06 00:00:009499.7130701808.248080
quux12015-02-06 00:00:0015543.9472001808.248080
bar12015-02-07 00:00:006224.922990413.590980
baz12015-02-07 00:00:0015580.485020413.590980
baz12015-02-08 00:00:0015580.4850201690.293980
foo12015-02-08 00:00:009499.7130701690.293980
qux12015-02-08 00:00:008692.2376501690.293980
baz12015-02-09 00:00:0015580.4850201152.413020
budgie12015-02-09 00:00:0012117.4157001152.413020
coffee12015-02-10 00:00:0011318.022050913.641180
baz12015-02-11 00:00:0015580.485020377.504700
coffee12015-02-13 00:00:0011318.0220501073.617000
qux12015-02-13 00:00:008692.2376501073.617000
baz12015-02-14 00:00:0015580.485020940.187570
baz12015-02-15 00:00:0015580.485020324.303680
baz12015-02-16 00:00:0015580.4850201520.799690
budgie12015-02-16 00:00:0012117.4157001520.799690
qux12015-02-17 00:00:008692.237650161.219360
budgie12015-02-18 00:00:0012117.415700441.257960
quux12015-02-18 00:00:0015543.947200441.257960
foo12015-02-19 00:00:009499.713070796.852410
baz12015-02-20 00:00:0015580.4850202220.330190
coffee12015-02-20 00:00:0011318.0220502220.330190
foo12015-02-20 00:00:009499.7130702220.330190
quux12015-02-20 00:00:0015543.9472002220.330190
coffee12015-02-22 00:00:0011318.022050465.508770
coffee12015-02-23 00:00:0011318.022050213.024870
budgie12015-02-24 00:00:0012117.415700null
qux12015-02-25 00:00:008692.237650622.379370
baz12015-02-26 00:00:0015580.4850202400.198700
coffee12015-02-26 00:00:0011318.0220502400.198700
foo12015-02-26 00:00:009499.7130702400.198700
qux12015-02-26 00:00:008692.2376502400.198700
bar12015-02-27 00:00:006224.922990621.441300
coffee12015-03-01 00:00:0011318.022050306.508530
qux12015-03-02 00:00:008692.237650965.593940
qux12015-03-03 00:00:008692.237650184.732280
bar12015-03-04 00:00:006224.9229901918.101030
coffee12015-03-04 00:00:0011318.0220501918.101030
qux12015-03-04 00:00:008692.2376501918.101030
baz12015-03-05 00:00:0015580.4850201001.228820
foo12015-03-06 00:00:009499.713070616.839970
bar12015-03-07 00:00:006224.922990541.216030
quux12015-03-07 00:00:0015543.947200541.216030
budgie12015-03-08 00:00:0012117.415700354.241740
coffee12015-03-10 00:00:0011318.022050229.352060
budgie12015-03-11 00:00:0012117.41570091.945190
coffee12015-03-11 00:00:0011318.02205091.945190
foo12015-03-12 00:00:009499.713070629.308740
quux12015-03-12 00:00:0015543.947200629.308740
budgie12015-03-13 00:00:0012117.415700985.443300
quux12015-03-13 00:00:0015543.947200985.443300
quux12015-03-14 00:00:0015543.9472001401.613950
qux12015-03-14 00:00:008692.2376501401.613950
baz12015-03-15 00:00:0015580.485020583.735120
coffee12015-03-15 00:00:0011318.022050583.735120
foo12015-03-16 00:00:009499.713070null
budgie12015-03-19 00:00:0012117.415700678.858540
foo12015-03-19 00:00:009499.713070678.858540
bar12015-03-20 00:00:006224.922990726.706800
coffee12015-03-20 00:00:0011318.022050726.706800
bar12015-03-21 00:00:006224.922990908.055060
foo12015-03-21 00:00:009499.713070908.055060
baz12015-03-22 00:00:0015580.4850202451.964490
coffee12015-03-22 00:00:0011318.0220502451.964490
quux12015-03-22 00:00:0015543.9472002451.964490
qux12015-03-23 00:00:008692.237650120.296260
budgie12015-03-24 00:00:0012117.415700631.868340
quux12015-03-24 00:00:0015543.947200631.868340
coffee12015-03-25 00:00:0011318.022050659.141450
quux12015-03-27 00:00:0015543.947200389.253460
coffee12015-03-28 00:00:0011318.022050888.506310
bar12015-03-29 00:00:006224.922990656.975630
foo12015-03-30 00:00:009499.713070319.001630
qux12015-03-30 00:00:008692.237650319.001630
baz12015-03-31 00:00:0015580.4850201216.804060
quux12015-03-31 00:00:0015543.9472001216.804060
quux12015-04-03 00:00:0015543.947200286.252680
baz12015-04-04 00:00:0015580.485020600.597360
budgie12015-04-06 00:00:0012117.415700727.247940
quux12015-04-06 00:00:0015543.947200727.247940
baz12015-04-07 00:00:0015580.485020489.016260
bar12015-04-08 00:00:006224.922990941.664260
qux12015-04-08 00:00:008692.237650941.664260
foo12015-04-10 00:00:009499.7130701042.039390
quux12015-04-10 00:00:0015543.9472001042.039390
quux12015-04-11 00:00:0015543.9472001451.050870
qux12015-04-11 00:00:008692.2376501451.050870
coffee12015-04-13 00:00:0011318.0220501124.489320
foo12015-04-13 00:00:009499.7130701124.489320
bar12015-04-14 00:00:006224.922990720.692800
budgie12015-04-14 00:00:0012117.415700720.692800
budgie12015-04-16 00:00:0012117.415700375.031780
bar12015-04-17 00:00:006224.922990719.802760
baz12015-04-17 00:00:0015580.485020719.802760
coffee12015-04-18 00:00:0011318.0220501436.532380
foo12015-04-18 00:00:009499.7130701436.532380
quux12015-04-19 00:00:0015543.947200692.414110
budgie12015-04-21 00:00:0012117.415700835.678890
qux12015-04-21 00:00:008692.237650835.678890
baz12015-04-22 00:00:0015580.485020854.115150
quux12015-04-22 00:00:0015543.947200854.115150
bar12015-04-24 00:00:006224.922990384.977630
budgie12015-04-24 00:00:0012117.415700384.977630
budgie12015-04-25 00:00:0012117.4157001413.477800
coffee12015-04-25 00:00:0011318.0220501413.477800
quux12015-04-25 00:00:0015543.9472001413.477800
budgie12015-04-26 00:00:0012117.415700658.975240
coffee12015-04-26 00:00:0011318.022050658.975240
baz12015-04-27 00:00:0015580.4850201259.157640
budgie12015-04-27 00:00:0012117.4157001259.157640
foo12015-04-28 00:00:009499.713070null
bar12015-04-29 00:00:006224.922990687.214570
foo12015-04-29 00:00:009499.713070687.214570
budgie12015-04-30 00:00:0012117.4157001200.455100
qux12015-04-30 00:00:008692.2376501200.455100
0.0091710090637207 ms (with caching enabled)

Used Versions
PHP 7.4, Zend 3.0, Symfony 4.3, Laravel 5.8, PHPUnit 8.0, Doctrine 2.10