1 Resposta
- Mais recentes
- Mais votos
- Mais comentários
0
Below mentioned is the Sample dataset that I have used :
sno | ts |
---|---|
A | 2010-12-30 14:32:00 |
B | 2010-12-30 15:06:00 |
C | 2010-12-30 16:34:00 |
A | 2011-01-06 09:18:00 |
D | 2011-01-06 12:18:00 |
B | 2011-01-06 01:18:00 |
- Created a calculated field to extract the hour from the timestamp field "ts" as follows :
extract('HH', ts)
- Created another calculated field "periodcalc" which groups based on the hours into different intervals as follows :
ifelse(hour<=5,'Q1', hour>5 AND hour<=10,'Q2', hour>10 AND hour<=15,'Q3', hour>15 AND hour<=20,'Q4', 'Q5')
- Finally the result looks like this :
respondido há 9 meses
Conteúdo relevante
- AWS OFICIALAtualizada há 2 anos
- AWS OFICIALAtualizada há 2 anos
- AWS OFICIALAtualizada há 3 anos