Hi All, Can someone give me a hand with the syntax to accomplish the following?
Code:
Table A
SERIAL UPTIME_MINUTES
A123 60
B456 50
C789 40
Table B
SERIAL REASON DOWNTIME_MIUNTES
A123 POWER 10
A123 WATER 20
A123 POWER 50
B456 ICE 10
C789 FIRE 50
C789 POWER 40
desired results
I want to return all rows (with totals for UPTIME_MINUTES) from A and totals from B where REASON = 'POWER'
SERIAL UPTIME DOWNTIME
A123 60 60
B456 50 0
C789 40 40