Jump to content
Changes to the Jaspersoft community edition download ×

Using crosstab obtain average and maximum duration from Time column


vanjaxi.sm

Recommended Posts

There are 2 tables SL and DL.

DL:id, device_name, username

SL: id, time(hh:mm:ss)

SL.PNG.952078ae87955f1b49e6ee2d77addbf9.PNG

My required output should be 

duration.PNG.d853b7417e2490cd340c27e9278fa745.PNG

I tried query

select DE.device_name, AVG(SL.time),MAX(SL.time)

FROM DE
     INNER JOIN 
     SL
ON DE.id= SL.id
group by DE.device_name
 
and few other queries, I get average and maximum duration in column header and rest all values zero. I should get average values and max values for every device _name. Help me get it using crosstab element in jasper soft studio.
 
Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Posted Images

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...