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).
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.
Subscribe to premium account to see the solution.Get premium now