Sample Header Ad - 728x90

Selecting last value to be entered each month

0 votes
2 answers
212 views
I am looking to pull a closing balance from the database for each month. I have tried SELECT CloseBal As 'Balance', MONTHNAME(DateTime) as 'Month', DateTime FROM Table1 WHERE MAX(DateTime) Group By Month I am getting an error invalud use of grouping function What would be the best way to achieve this?
Asked by Paulmcf1987 (43 rep)
Feb 3, 2023, 04:05 PM
Last activity: Jun 17, 2025, 03:06 PM