SQL server queries

SQL server queries according to dates