Add function
Add some tests
Add more tests
Merge branch 'minFromTable'