We value your feedback.
Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!
set ANSI_NULLS ON set QUOTED_IDENTIFIER ON GO alter PROCEDURE [dbo].[stp_GetCountMonthWise] @startdate DATETIME, @finishdate DATETIME AS SELECT TheYear = MAX(YEAR(registration_date)), TheMonth = MAX(DATENAME(mm,registration_date)), TheTotal = COUNT(id), female = SUM(case when isnull(sex,'Unknown') = 'Female' then 1 else 0 end), male = SUM(case when isnull(sex,'Unknown') = 'Male' then 1 else 0 end) FROM registrations WHERE registration_date >= @startdate AND registration_date <= @finishdate group by YEAR(registration_date), datepart(mm,registration_date) Order by YEAR(registration_date), datepart(mm,registration_date)
Add your voice to the tech community where 5M+ people just like you are talking about what matters.