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 interesting SQL exercise.
Given a table that specifies various amounts of money: 12, 18, 36, and 49.
CREATE TABLE money_values (id int identity(1,1), mon int) GO
Given an additional table that specifies various coins (1 ILS, 2 ILS, 5 ILS, 10 ILS).
CREATE TABLE coins (id int identity(1,1), coin int) GO