Select Users Age in MySQL

SELECT count(id) AS toplam,YEAR(tarih_dogum) AS YIL FROM uyeler GROUP BY YEAR(tarih_dogum)

Advertising agencies wants to user profile for advertisements. I need my users age. I found a little solution. I write this SQL statement for select which year my users born and group them.

SELECT count(id) AS total,YEAR(birthday) AS birth_year FROM users GROUP BY YEAR(birthday);
After i copied this results to Excel. I calculate age groups like “18-24 years old” in Excel and send my offer to agencies.
Share and Enjoy:
  • StumbleUpon
  • Digg
  • TwitThis
  • FriendFeed
  • del.icio.us
  • MySpace
  • Technorati
  • Facebook
  • Google Bookmarks
  • Live

Enjoy this article?

Consider subscribing to our RSS feed!

Share us Facebook, FriendFeed, Digg

This website uses IntenseDebate comments, but they are not currently loaded because either your browser doesn't support JavaScript, or they didn't load fast enough.

No Comments

No comments yet.

Sorry, the comment form is closed at this time.

Oyun