i have data on daily basis.
Date Number day of the week
2019-05-02 52.55 thursday
2019-05-03 327.57 friday
2019-05-04 279.97 saturday
2019-05-05 266.87 sunday
2019-05-06 374.41 monday
2019-05-07 301.24 tuesday
2019-05-08 373.11 wednesday
i want to write 1 query which shows me the data as average for weekdays and average for weekends separately
say in the above case the output should look like
weekend : 273.42
weekday : 285.77
thanks in advance
<your current output>|rename "day of the week" as day|eval day=case(day="Wednesday" OR day="Thursday" OR day="Monday" OR day="Tuesday" OR day="Friday","weekday",day="Saturday" OR day="Sunday","weekend")|stats avg(Number) by day
Take care of the string cases and spellings
<your current output>|rename "day of the week" as day|eval day=case(day="Wednesday" OR day="Thursday" OR day="Monday" OR day="Tuesday" OR day="Friday","weekday",day="Saturday" OR day="Sunday","weekend")|stats avg(Number) by day
Take care of the string cases and spellings