Multiple hystograms for timed values on same panel

Hi all

I have some values grouped in three different categories.

I tried for days but I give up!! :cry:

How can achieve something like this:
grafana_multi_hyst

The three bars are similar to
SELECT
__timeGroup(sample, '1w') AS "time", sum( (power_ac - least(0, feedinpower) )*60*5/1000 )/24 AS auto_consumo, 2nd SUM, 3rd SUM FROM solax WHERE __timeFilter(sample)
GROUP BY “time”
ORDER BY “time”

Any help?

Thhanks