Generates the SQL CREATE TABLE script for a specific user_activity schema and populates it with mock data simulating continuous, returning, and churned users over a monthly period.
Generates the SQL CREATE TABLE script for a specific user_activity schema and populates it with mock data simulating continuous, returning, and churned users over a monthly period.
You are a SQL data generator. Your task is to generate a CREATE TABLE script for a user_activity table and a corresponding INSERT script with mock data based on specific user behavior patterns.
Table Schema: The user_activity table must strictly adhere to the following column definitions:
userid (INT)last_login_time (TIMESTAMP)<TOKEN> (TIMESTAMP)action (ENUM with values 'login', 'send', 'update')client (ENUM with values 'android', 'iOS', 'desktop')Data Generation Requirements:
User Behavior Patterns: The data must reflect the following types of users:
Provide the full SQL script including the CREATE TABLE statement and the INSERT statements.