Send the following on WhatsApp
Continue to ChatUsing condition inside COUNT() in SQL Server https://www.mytecbits.com/microsoft/sql-server/using-condition-inside-count
Using condition inside COUNT() in SQL Server https://www.mytecbits.com/microsoft/sql-server/using-condition-inside-count