[Solved] SQL Query to add result set values as column values


YOU WANT TO DO IT LIKE THIS BECAUSE THIS WILL WORK TO SOLVE YOUR PROBLEM.

SELECT 'NetworkKey' AS AuthKey,
        COUNT(*) AS TotalCount,
        SUM(CASE WHEN NetworkSK IS NULL THEN 1 ELSE 0 END) AS NUllcount,
        SUM(CASE WHEN NetworkSK IS NOT NULL THEN 1 ELSE 0 END) AS NotNullcount
FROM EDW.Fact.AuthorizationRequest

Happy holidays.

5

solved SQL Query to add result set values as column values