8. Create daily tracking table of user status (done) Given a table that each day shows who was active in the system and a table that tracks ongoing user status, write a procedure that will take each day's active table and pass it into the ongoing daily tracking table. Possible states are: user stayed (yesterday yes, today yes) * user churned iyesterday yes, today nol . user revived (yesterday no, Inday yes) . user new (yeslends, null, today yes) Note: you'll want to spot and account for the undefined state. TABLE1: Tracking [user, status] TABLE2: Day (user] How do you calculate monthly active users, churned users and resurrected users from a user activity log with userID and Date Time 9. TABLE Friend: [datetime | action: ('request_sent', 'request_accepted") | actor_id | target_id] (done) Find friend acceptance rate trending Define how long you have to wait before a friend request is considered rejected (e.g. 1 week) Here a user may send multiple request to a same user at different time 10. Recommend pages your friends liked. (Done) You have two lables . the first table has data about the users and their friends. . the second table has data about the users and the pages they have liked. TABLE1: Friends (user_id, friend_id} TABLE2: Page (user_id, page_id] Write an SQL query to make recommendations using pages that your friends liked. The query result should not recommend the pages that have already been liked by a user. 11. Advertise Conversion Rate(done) TABLE1: Advertise (ads_id, timestamp, publisher_id, price] TABLE2: VIEW (ads_id, timestamp, view, clicks] QUESTION: conversion rate for publisher_id = 'P' and Date = 'date' (a specific publisher on a specific date) 12. table: date | user_A | user_B | number_messages(done) Each row has the number of messages between a unique user pair