Satva Solutions interview question

asking genearal and logical question. also a sql queries