Senin, 13 Juni 2016

[MS_AccessPros] sql to show count by month

 

Pros and heh – sql meister John…

 

I’m trying to get the sql to show a total count by month / year of the last 365 days but show it in chronological sequence and am at a loss.

 

Here’s my sql

 

SELECT DatePart("m",[Date approved]) & "-" & DatePart("yyyy",[Date approved]) AS [When], Count([RFC Input].[CRF #]) AS ECRs

FROM [RFC Input]

WHERE ((([RFC Input].[Date approved])>Date()-365))

GROUP BY DatePart("m",[Date approved]) & "-" & DatePart("yyyy",[Date approved]);

 

But then it shows up in ascii sequence

ECRApprovedCountOfYear

When

ECRs

10-2015

239

11-2015

170

1-2016

216

12-2015

155

2-2016

167

3-2016

208

4-2016

230

5-2016

270

6-2015

164

6-2016

102

7-2015

337

8-2015

297

9-2015

250

 

 

Respectfully,

Liz Ravenwood

Programmer / Analyst

B/E Aerospace | Super First Class Environments

 

1851 S Pantano Road | Tucson, Arizona 85710

Office +1.520.239.4808 | Internal 814-4808

beaerospace.com

Passion to Innovate. Power to Deliver

 



This email (and all attachments) is for the sole use of the intended recipient(s) and may contain privileged and/or proprietary information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.

__._,_.___

Posted by: Liz Ravenwood <Liz_Ravenwood@beaerospace.com>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (1)

Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? Now you can access all your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email again with 1000GB of free cloud storage.


.

__,_._,___

Tidak ada komentar:

Poskan Komentar