FNZ interview question

DI,SQl topic, C# pattern and SQL query answer