How to get this example out put with SQL
Posted on 2014-10-10
I have bellow example :
day | duration >29 | duration <10
1-october | 125456 | 465498
3-october | 255456 | 465447
I want to do this in sql/postgress I tried with sum(case when etc) but I having condition didn't work their, just one thing more that I want the total of duration like if someone connected to connection 3 times with 10 second so it should be come under ( duration >29) or if total duration of one connection would be greater 29 it will come under that as well.