Data Interview Qs - User Churn

InterviewQs

User Churn

SQL Database Querying

Forward this email to a friend or colleague and challenge them to solve it.

You're given a table called userActivityLogs. This table contains data on each time a user opens into Application X. Below is some sample data from this table. You can assume this table has all the historical data one would expect (this table will be large assuming Application X has a number of loyal users).

userid date session_duration_ms start_timestamp end_timestamp
139281 2019-01-01 21240 1546300800 1546322040
139281 2019-01-02 21600 1546401600 1546423200

Application X defines an active user as one that has opened the application within the last 30 days. Using SQL, can you write a query that outputs users who are inactive? Your output should have userid and the number of days since the last login.



 

Update: You’ve accumulated 133 questions since joining our email list. Create a premium account to access detailed solutions to each problem (including this one).


Was this email forwarded to you? You can join our list here to receive questions

How did you like today's question?

15411 Boischatel, Montreal, QC, H9H1Y7, Canada
Don't want to get these emails anymore? We'll forgive you if you unsubscribe

Older messages

Plotting stock prices

Friday, May 7, 2021

Data Analysis, Python, Pandas, External Dataset, Matplotlib, InterviewQs Plotting stock prices Data Analysis Python Pandas External Dataset Matplotlib Forward this email to a friend or colleague and

Pricing a life insurance product

Wednesday, May 5, 2021

Statistics, Probability Theory, Expected Value, InterviewQs Pricing a life insurance product Statistics Probability Theory Expected Value Update: You've accumulated 131 questions in your account.

In SQL, 0 = 0?

Friday, April 30, 2021

SQL, Database Querying, InterviewQs In SQL, 0 = 0? SQL Database Querying In SQL, what will be the result of the below query? select case when null = null then 'Yes' else 'No' end as

Normalizing student grades against median

Wednesday, April 28, 2021

Data Analysis, Python, Pandas, Data Manipulation, Normalization, InterviewQs Normalizing student grades against median Data Analysis Python Pandas Data Manipulation Normalization You are given a

Identity Matrix

Friday, April 23, 2021

Data Interview Qs Identity Matrix Python Data Structures Arrays Matrix Can you build a function that prints an identity matrix, given the identity matrix size? Examples: Input: 2 Output: 1 0 0 1 Input:

You Might Also Like

LW 130 - Building a Product Configurator

Tuesday, April 23, 2024

Building a Product Configurator Shopify Development news and articles Issue 130 - 04/23/2024 Read Online Liquid Weekly All Things Shopify Development How to Sell Personalized Products on Shopify 2024 -

New public workshop in June: architecting for fast flow

Tuesday, April 23, 2024

Get the early bird discount You are receiving this email because you subscribed to the microservices.io mailing list. Helping organizations accelerate software delivery I provide consulting and

Pnpm v9.0.0; Biome v1.7; ESLint v9.1.0; Node.js collaboration summit; Intl.Segmenter; tree shaking;

Tuesday, April 23, 2024

We have 9 links for you - Stay up-to-date on JavaScript and tools WorkOS, the modern API for auth and user identity. workos.com Sponsor WorkOS enables B2B SaaS companies to accelerate enterprise

New on VC+: Our Visual Briefing on the IMF's World Economic Outlook Report 🔮

Tuesday, April 23, 2024

We've compiled a visual analysis of the most important takeaways from IMF's latest report. View email in browser EXCLUSIVE PREVIEW Upcoming on VC+: Our Key Takeaways from IMF's World

Meta teases a limited-edition, Xbox-inspired Quest headset

Tuesday, April 23, 2024

The Morning After It's Tuesday, April 23, 2024. Meta announced it's opening up the Quest's operating system to third-party companies, allowing them to build headsets of their own. The Quest

Post from Syncfusion Blogs on 04/23/2024

Tuesday, April 23, 2024

New blogs from Syncfusion What's New in Blazor Query Builder: 2024 Volume 1 By Satheeskumar S This blog explores the new features added in the Syncfusion Blazor Query Builder component as part of

Police Chiefs Call for Solutions to Access Encrypted Data in Serious Crime Cases

Tuesday, April 23, 2024

THN Daily Updates Newsletter cover Java All-in-One For Dummies, 7th Edition ($27.00 Value) FREE for a Limited Time A beginning coder's resource for learning the most popular coding language

Edge 389: Understanding Large Action Models

Tuesday, April 23, 2024

One of the most important concepts in autonomous agents. ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏

Apple World Cup bid ⚽, Meta opens VR OS 🌎, Anthropic's prompt library 🤖

Tuesday, April 23, 2024

Apple is working to secure an exclusive TV deal with FIFA Sign Up |Advertise|View Online TLDR Together With WorkOS TLDR 2024-04-23 WorkOS is the only auth provider your B2B SaaS app needs to start

New Blogs on ThomasMaurer.ch for 04/23/2024

Tuesday, April 23, 2024

View this email in your browser Thomas Maurer Cloud & Datacenter Update This is the update for blog posts on ThomasMaurer.ch. Cloud operations for Windows Server through Azure Arc By Thomas Maurer