Skip to content
Advertisement

SQL Server query to show summary list for particular months or between dates

I have an attendance table which contains student’s attendance date and attendance status.

Is there any way to display a summary something like this:

Through a SQL Server query?

I have tried with the PIVOT but it is not working because of aggregate function.

Advertisement

Answer

I have tried with PIVOT but it not working because of aggregate function.

You can use MAX as an aggregate function like so:

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement