Get week with information

Viewed 26

I would BIGQUERY to pull out the latest previous week that has the number of hour more than zero.

WEEK | HOUR
  1  |  2
  2  |  0
  3  |  0
  4  |  3

From the above example. I would like to pull the last_active_week . If this week is 4, the result would return week 1. Any ideas how to solve this? Thank you in advance!

0 Answers
Related