Back to problems

Basic SQL Querying (Filtering, Aggregation, Join, Window Functions)

SQL · OpenAI · Medium

Problem Assume the following two tables are available: users user_id (INT) country (STRING) signup_date (DATE) events event_id (INT) user_id (INT) event_time (TIMESTAMP) event_type (STRING) value (FLOAT) Write one or more SQL queries that produce these results: Return the number of users in each country. Calculate daily active users by counting distinct users for every DATE(event_time). Find each user's earliest event timestamp together with the corresponding event type. For…

Checking your access…