splitted DB in query, DB and output