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.
An electronics store manages the following Gadgets table. This table contains the gadget name, number, and type:
CREATE TABLE gadgets (GadgetID int identity(1,1), GadgetName varchar(50), GadgetType varchar(50)) GO