I am strugling with a sql select query for my MVC Web Application. I have a datetime field in my local db, and I want to query all the customers that have created an appointment in the first semester, or the second semester of the year.
Something like this :
Select Count( all the appointments until '01/06/2020') as FirstSemester,
Count(all the appointments from '01/06/2020' until '31/12/2020) as SecondSemester
PS: I want to have two counts, because with those values I am going to create a chart to illustrate the system evolution(how many clients in the first semester vs second semester).
Does this kind of query exist? And if the answer is yes, how would it look like?
Thank you so much!