Skip to main content

Post Success After Failure

HardPremium

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 that shows the success rate of post (%) when the user's previous post had failed.

Your output should have the following columns: user_id and next_post_sc_rate (success rate of post when user’s previous post had failed). Order results by increasing next_post_sc_rate.