year_of_calendar,
month_of_year
FROM
sys_calendar.calendar
WHERE
calendar_date<=current_date AND EXTRACT(month FROM calendar_date)<> EXTRACT(MONTH FROM current_date) AND
--because you want last 6 months and not current month
calendar_date>current_date-INTERVAL '6' MONTH
GROUP BY 1,2
ORDER BY 1 DESC, 2 DESC;
Results set look like this:
Yr Mo
2010 03
2010 02
2010 01
2009 12
2009 11
2009 10
Thanks for Information Teradata Online Training is one of the most emerging technologies in market. As more and more organization are moving their data warehouse in Teradata database, so the demand of Teradata Professionals are high. We at TeradataTech started giving online training sessions for all folks who are interested in learning this technology. People who are interested in learning the basics and advance features of Teradata Development can benefit from this training.
ReplyDeleteTeradata is a popular Relational Database Management System (RDBMS) suitable for large data warehousing applications. This is great post by admin on Teradata. Also learn Teradata from the best Teradata Online Training in your locality at CatchExperts.com
ReplyDeleteThanks for the scenario well explained, for more tutorials and online training on Teradata visit TekSlate.
ReplyDeletenice article
ReplyDeleteVmware Training
Azure Training
SCOM Training
Quality AnalysisTraining
QTP Training
Manual Testing Training
good job keep posting....
ReplyDeleteIELTS Coaching in chennai
German Classes in Chennai
GRE Coaching Classes in Chennai
TOEFL Coaching in Chennai
spoken english classes in chennai | Communication training
nice blog!!!
ReplyDelete