sql - SUM MySQL rows of one column and have it group by another -


hey guys i'm trying create query sums 1 column , groups result another.

let me show mean showing tables!

this tickets table

enter image description here

expect result

enter image description here

as can see groups column app , issue , sums time per issue.

currently have this

 select app,issue,sum(time)  tickets  group issues  order name asc; 

however it's not outputting expected result. appreciated.

you need group app in addition issues

select app,issue,sum(time) tickets group app,issue order name asc; 

Comments

Popular posts from this blog

node.js - Mongoose: Cast to ObjectId failed for value on newly created object after setting the value -

[C++][SFML 2.2] Strange Performance Issues - Moving Mouse Lowers CPU Usage -

ios - Possible to get UIButton sizeThatFits to work? -