Skip to main content

Monthly Post Success Analysis

Easy

You are given the following tables:

post table:

post_idpost_dateuser_idinterfaceis_successful_post
integertimestampintegerstringboolean

post_user table

user_iduser_typeage
integerstringinteger

Write a SQL query that shows the total amount of successful post per user type in the current month (Assume current month is Nov 2023)

Your output should include the following columns: user_type, post_success (no. of successful posts), post_attempt (no. of posts), post_success_rate (range: 0.00 - 1.00). Order by descending success rate