If this is your first visit, be sure to check out the FAQ by clicking the link above.
You may have to register before you can post: click the register link above to proceed.
To start viewing messages, select the forum that you want to visit from the selection below.
Hi,
Here is the scenario. I need to get the data from a table on a weekly basis. To be more clear, Actually we have a table which has 10000 records. The fields are,
We have records starting from year 2000. We need to get the count of rpt_type by weekly ( ie group by weekly basis). The date & time is stored in the rpt_time.
Is there a way we can achieve this through a query grouping by week.
try the following query:
select rpttype, year, week, count(*)
from
(select rpttype, year(rpt_time) as year, week(rpt_time) as week
from your_table)
group by rpttype, year, week
Originally posted by antodomnic
Hi,
Here is the scenario. I need to get the data from a table on a weekly basis. To be more clear, Actually we have a table which has 10000 records. The fields are,
We have records starting from year 2000. We need to get the count of rpt_type by weekly ( ie group by weekly basis). The date & time is stored in the rpt_time.
Is there a way we can achieve this through a query grouping by week.