Refactor sql code into base and main
Implement IN-query
Test AND-clauses
Add specs for IN-query