fbpx

94. Time Differences

This advanced SQL exercise is part of the book: Advanced SQL – Practical Techniques and Use-Cases, which includes 100 day-to-day SQL challenges (and solutions), need-to-know advanced features, and key concepts.
 

A semiconductor fabrication plant manages the following machine table. This table specifies the various machines in the factory, and the successive periods of time during which they operated, in tow cycles. For example: in the first cycle, MachineA operated consecutively for 10:30 hours; in the second cycle – for 9 hours.


CREATE TABLE time_log    
(MachineId int identity(1,1),     
MachineType varchar(25),     
Time1 varchar(25),     
Time2 varchar(25))    

To read more

UpScale Analytics is one of the largest platforms in the world for learning SQL by doing, consisting over 300 SQL exercises at different levels (including solutions), by topics, across over 100 different datasets. More…