sql statement for wekly and monthly report

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
abbyEin
Forum Newbie
Posts: 2
Joined: Tue Aug 18, 2009 9:49 pm

sql statement for wekly and monthly report

Post by abbyEin »

hi..

i have a problem to retrieve my data from database..
i want to make a report by weekly and monthly.. the problem is i've try many sql statement to retrieve the data by week or month in the year.. weekly i get but for monthly i did'nt get the solution.. i try this statement..

Code: Select all

select e_id, birth_date
from employee_per where
MONTH(birth_date) = MONTH(SYSDATE())
but the result is for whole year and that month..

what statement can i use for retrieve monthly data for current year??
can smbody who is expert help me.. :cry:
Post Reply