SpaceX's mission operations team wants to understand how frequently each user posts mission updates. Calculate the average number of days between consecutive valid posts for each user. Ignore posts with missing dates. Only include users who have made more than one valid post. If multiple posts have the same timestamp, use the post with the greater post ID as the later post. Return the user ID and average number of days between posts rounded to two decimal places. Sort the results by user ID in descending order. ### Table Schema | Table | Column | Type | |---|---|---| | user_posts | post_id | integer | | user_posts | user_id | integer | | user_posts | post_date | timestamp | | user_posts | post_text | varchar(255) | ### Example Input: user_posts | post_id | user_id | post_date | post_text | |---:|---:|---|---| | 1 | 101 | 2025-01-01 10:00:00 | Launch checklist started | | 2 | 101 | 2025-01-05 10:00:00 | Payload review complete | | 3 | 101 | 2025-01-07 10:00:00 | Weather review complete | | 4 | 102 | 2025-01-03 09:00:00 | Propulsion update | | 5 | 102 | 2025-01-10 09:00:00 | Static fire review | | 6 | 103 | 2025-01-04 12:00:00 | Mission update | ### Example Output Explanation User 101 has gaps of four days and two days between consecutive posts, so the average gap is three days. User 102 has two valid posts with a seven-day gap. User 103 has only one valid post and is excluded.
DROP TABLE IF EXISTS user_posts; CREATE TABLE user_posts ( post_id INT, user_id INT, post_date TIMESTAMP, post_text VARCHAR(255) ); INSERT INTO user_posts VALUES (1, 101, '2025-01-01 10:00:00', 'Launch checklist started'), (2, 101, '2025-01-05 10:00:00', 'Payload review complete'), (3, 101, '2025-01-07 10:00:00', 'Weather review complete'), (4, 102, '2025-01-03 09:00:00', 'Propulsion update'), (5, 102, '2025-01-10 09:00:00', 'Static fire review'), (6, 103, '2025-01-04 12:00:00', 'Mission update');