Search found 4 matches
- Wed Oct 12, 2016 2:01 pm
- Forum: Vertica SQL
- Topic: Running Count Distinct
- Replies: 4
- Views: 21738
- Wed Oct 12, 2016 1:13 pm
- Forum: Vertica SQL
- Topic: Running Count Distinct
- Replies: 4
- Views: 21738
Running Count Distinct
How many customers where active last 365 days? We use this as a "churn" KPI. Say 3,456,466 customers made at least one purchase between yesterday - 365 and yesterday. Now we run the following query every day just to see for one day at a time or populate a spreadsheet: SELECT COUNT(DISTINCT CUSTOMER_...
- Wed Oct 12, 2016 12:45 pm
- Forum: Vertica SQL
- Topic: Overlapping time intervals
- Replies: 2
- Views: 18889
Re: Overlapping time intervals
Thanks Sharon, problem solved!
- Fri Sep 16, 2016 8:28 am
- Forum: Vertica SQL
- Topic: Overlapping time intervals
- Replies: 2
- Views: 18889
Overlapping time intervals
I have a login log from which I want to derive the first time a user logged in through a month plus n days. For a single period this is of course very easy, but I want an otput like: User-ID, Period Start, Period End, Min Log in time 1, 1/1/2016,2/10/2016,1/12/2016 03:24:12 1,2/1/2016,3/10/2016,2/5/...