How to sum up last -values

Hello,

I am new to grafana.

I’m trying to build a dashboard with the power consumption based on rooms.

For one room I have light and sockets. The value in the table is always the total value - so I have to use the selector last.

When I use this select, I get only randomly lights or sockets:
SELECT last(“value”) FROM “consumption” WHERE (“Room” =~ /^Büro$/ AND “State” = ‘total’ AND “Room” <> ‘Technik’ AND “Room” <> ‘Heizraum’) AND time >= now() - 7d GROUP BY time(5m), “Room” fill(none)

If I also make a group on the field Label, I get two lines for the room “Büro”:
SELECT last(“value”) FROM “consumption” WHERE (“Room” =~ /^Büro$/ AND “State” = ‘total’ AND “Room” <> ‘Technik’ AND “Room” <> ‘Heizraum’) AND time >= now() - 7d GROUP BY time(5m), “Room”, “Label” fill(none)

But how can I get the sum of both last-values grouped on Room level?

Best regards,
Christian