mysql - Business Objects: Comparing Rows -


i have file containing several rows of data. column called 'description' contains data duplicated , in alphabetical order matching rows together. data can in 4s, 6s etc, but, number of rows (see row 20 23).

i need create record count (number of records match) , movement count (number of movements each record count). language in excel easy (see diagram), i'm not sure how replicate using business objects.

i've tried using 'previous()', so:

=if([description]=previous([description])) then~ 

but whatever try after 'then' seems create circular reference error because keep trying increase variable one.

hope makes sense.

can help, column w.

image link

to column "movements" can create fowling function , select

delimiter // create function rownr (s char(64))     returns int deterministic   begin     if s = @rownr_oldval       set @rownr_nr:=@rownr_nr+1;     else       set @rownr_nr:=1;     end if;      set @rownr_oldval:=s;     return @rownr_nr; end // delimiter ;   select  rownr(description) movements,  m.* mytable m,  (select rownr('')) tmp order description; 

Comments

Popular posts from this blog

javascript - Chart.js (Radar Chart) different scaleLineColor for each scaleLine -

apache - Error with PHP mail(): Multiple or malformed newlines found in additional_header -

android - Go back to previous fragment -