SQL Problem of the day #2
Problem Statement: Find the total duration each device was turned on.
Table creation and data insertion script:
CREATE TABLE electric_items(
id int,
type varchar(20),
status varchar(20),
time_res int
);
INSERT INTO electric_items VALUES(1,'light','o...
ishwarkoki.hashnode.dev1 min read