tltanhueco1990
New member
- Local time
- Today, 13:21
- Joined
- Mar 15, 2023
- Messages
- 29
Hello to everyone who's in the query forums! I'm a new user here. Really new, that I have to ask if it's possible to do multiple MonthName() in a single query.
I'm trying to produce an output where the numerical months turn to MonthName(), but alas. Only 1 month is being shown. Here's what I've done so far:
End goal is to count the number of admitted patients(admissions) by year(2023) and month(MonthName()).
I'm trying to produce an output where the numerical months turn to MonthName(), but alas. Only 1 month is being shown. Here's what I've done so far:
SQL:
SELECT Year(#11/3/2023#) AS [Year], MonthName(1) AS [Month], Count(*) AS Total
FROM admissions
GROUP BY Month([admission_date])
ORDER BY Month(admission_date);
End goal is to count the number of admitted patients(admissions) by year(2023) and month(MonthName()).