Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all!
I have a temp table like:
Date (yyyy-mm-dd), Value
2013-02-03, Red
2013-04-03, White
2013-04-04, White
2013-04-05, White
2014-02-08, White
2014-02-12, White
2014-01-10, White
2014-01-01, White
2014-01-02, White
2014-01-04, White
I need to make a resident load from this table into a new table grouped by MonthName and counting records, like this:
MonthName, Count of records
2013-02, 1
2013-04, 3
2014-01, 4
2014-02, 2
Does anyone know how to do it?
Thanx!!
Pablo
tabInput:
LOAD * Inline [
Date, Value
2013-02-03, Red
2013-04-03, White
2013-04-04, White
2013-04-05, White
2014-02-08, White
2014-02-12, White
2014-01-10, White
2014-01-01, White
2014-01-02, White
2014-01-04, White
];
tabOutput:
LOAD Date(MonthName(Date),'YYYY-MM') as MonthName,
Count(Date) as [Count of records]
Resident tabInput
Group By MonthName(Date);
hope this helps
regards
Marco
Thanx Marco!
You're welcome
regards
Marco