Hi, H2 supports "running totals" in the MySQL style. Maybe the following could be used as a start:
drop table test; create table test(year int, month int); insert into test values(2000, 1), (2000, 2), (2000, 3), (2001, 1); select @y := case when rownum()=1 then year when @y = year then null else year end, month from test group by year, month order by year, month If you need more details, maybe best look / ask at StackOverflow and use the "MySQL". Regards, Thomas On Sunday, January 12, 2014, Cecil Westerhof wrote: > 2014/1/12 Atul Chowdhury <[email protected] <javascript:_e({}, > 'cvml', '[email protected]');>> > >> No, I'm afraid not. What's your final output? If its a report, you may >> want to consider a reporting tool ( Jasper/BIRT/etc ) to satisfy this >> requirement. >> > > It is done in the web-browser. But I am making some bash scripts to do > things. In those I could solve it. > > -- > Cecil Westerhof > > -- > You received this message because you are subscribed to the Google Groups > "H2 Database" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected] <javascript:_e({}, > 'cvml', 'h2-database%[email protected]');>. > To post to this group, send email to > [email protected]<javascript:_e({}, 'cvml', > '[email protected]');> > . > Visit this group at http://groups.google.com/group/h2-database. > For more options, visit https://groups.google.com/groups/opt_out. > -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/h2-database. For more options, visit https://groups.google.com/groups/opt_out.
