Yes. It is MS SQL.. u just consider above is the table with date range.. Can u give me the solution for that?