Implemented mixed database queries. fixed #20