fbpx

63. Splitting an Amount of Money into Coins

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

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…