Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have the following Table
USER_ID | ONLINE_BOOKING_COUNT | PHONE_BOOKING_COUNT | WALK_IN_BOOKING_COUNT | WALK_IN_BOOKING_COUNT_NON_PEAK |
319 | 3 | 3 | 1 | 0 |
736 | 1 | 0 | 0 | 0 |
547 | 0 | 1 | 2 | 0 |
311 | 3 | 5 | 2 | 0 |
474 | 1 | 1 | 0 | 0 |
680 | 2 | 0 | 2 | 0 |
357 | 1 | 0 | 1 | 1 |
908 | 1 | 3 | 2 | 2 |
482 | 2 | 2 | 2 | 0 |
565 | 0 | 0 | 2 | 2 |
277 | 3 | 5 | 2 | 2 |
1. I want COUNT THE USERS of PHONE, ONLINE, WALK_IN BOOKING but EXCLUDE IF WALK_IN_NON_PEAK=>0, PHONE=0, ONLINE=0. ie trying to Isolate users who book only using WALK_IN_NON_PEAK. (Example User ID 565)
2. SUM of bookings for ONLINE, PHONE, WALK_IN exclude USER if user books only WALK_IN-NON_PEAK
Thank you
1. COUNT({<WALK_IN_BOOKING_COUNT_NON_PEAK={'>=0'},ONLINE_BOOKING_COUNT={0},PHONE_BOOKING_COUNT={0}>}USERID)
... >= 0 ? Doesn't make sense to me to include 0's, but whatever. You asked for it. You can't isolate 565 this way though.
2. SUM({<WALK_IN_BOOKING_COUNT_NON_PEAK={'>0'}>} XXXXX_BOOKING_COUNT)
1. COUNT({<WALK_IN_BOOKING_COUNT_NON_PEAK={'>=0'},ONLINE_BOOKING_COUNT={0},PHONE_BOOKING_COUNT={0}>}USERID)
... >= 0 ? Doesn't make sense to me to include 0's, but whatever. You asked for it. You can't isolate 565 this way though.
2. SUM({<WALK_IN_BOOKING_COUNT_NON_PEAK={'>0'}>} XXXXX_BOOKING_COUNT)