marketplace

SQL

table: date|session_id|user_id| event

calculate the average number of sessions/user per day for the last 30 days

SELECT date, avg(ct)
FROM
    (
    SELECT date, user_id, count(session_id) as ct
    FROM t
    WHRE date BETWEEN subdate(current_date(),1) AND subdate(current_date(),30)
    GROUP BY date, user_id
    ) as temp
GROUP BY date
ORDER BY date

Analytics

  1. Market Place want to add a new feature, add a sell button on the top when enter market place

    • Why we want to build this feature?

    • What Metric we need to measure this?

    • How to test?

  2. Use the number of message sent to sellers/sessions to measure, the number decreased 10%

    • Why?

    • How would you measure it and test it?

    • What could we do?

Last updated