Hi,
I have a query in SQL Server 2014
select month((CDate)) as CreateMonth, year((CDate)) as CreateYear, count(*) "No of Users"
from kf, dt
where kf.type=0 and kf.ID=dt.ID
group by month(CDate), year(CDate)
order by year(CDate) desc, month(CDate) desc
It display results as below:
CreateMonth CreateYear No of Users
------------------- ---------------- -----------------
10 2018 7
9 2018 9
8 2018 6
7 2018 3
Now I want to have results as below:
CreateMonthYear No of Users
-------------------------- -----------------
Oct 2018 6
Sep 2018 16
Aug 2018 3
July 2018 20
So
1. Converting Month from numeric to three character Alphabets
2. Merging year together with month
3. Date column should be sorted DESC
Our community of experts have been thoroughly vetted for their expertise and industry experience.
The Most Valuable Expert award recognizes technology experts who passionately share their knowledge with the community, demonstrate the core values of this platform, and go the extra mile in all aspects of their contributions. This award is based off of nominations by EE users and experts. Multiple MVEs may be awarded each year.
The Distinguished Expert awards are presented to the top veteran and rookie experts to earn the most points in the top 50 topics.