Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version

Ask about a query in sql server

I guess you ment born every year.Count and Group by YEAR:SELECT YEAR(BirthDate) As [Year], COUNT(*) as [Count]FROM [HumanResources].[Employee]GROUP BY YEAR(BirthDate)Result: Year Count1945 11946 31947 11948 11949 11950 101951 1.....

Revisions


  

Compare Revision Minor Date Status Editor
publicly available No 19-Nov-12 5:58 Available StianSandberg
Updates in content. 21 changes had been made.
3 No 19-Nov-12 5:52 Available StianSandberg
Updates in content. 95 changes had been made.
2 No 19-Nov-12 5:51 Available StianSandberg
Updates in content. 48 changes had been made.
1 No 19-Nov-12 5:50 Available StianSandberg

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

StianSandberg
Software Developer (Senior)
Norway Norway
Microsoft Certified Solutions Developer (MCSD)
 
Personal website:
stian.net
 
My projects:
CRM1.no - A free to use norwegian crm software
Fakturax - A free to use norwegian invoice software
Timeføring.no - A free to use norwegian timereg software
MittUtlegg - A free to use norwegian software for receipts
SupportWeb - A free to use norwegian software customersupport
Follow on   Twitter

| Advertise | Privacy | Mobile
Web04 | 2.8.140709.1 | Last Updated 19 Nov 2012
Article Copyright 2012 by StianSandberg
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid