Q3 Technologies interview question

Write sql query , .net basic commands