We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
where NATURAL is equivalent to USING (challenge_id), and it turns out that ORDER isn't needed since the Contests come already in order.
PS1: in MySQL 8 we could also use NATURAL INNER ... rather than of INNER ... USING(...), but this is not possible in MySQL 5.
PS2: Note that always total submissions >= accepted ones, and total views >= unique views, so it's enough to test sum(ts)>0 or sum(tv)>0 rather than the sum of all four.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Java If-Else
You are viewing a single comment's thread. Return to all comments →
Unfortunately it seems they don't have MySQL 8.0 and MySQL 5.7 does not have WITH, so one has to use subqueries directly, viz
where
NATURALis equivalent toUSING (challenge_id), and it turns out thatORDERisn't needed since the Contests come already in order.PS1: in MySQL 8 we could also use
NATURAL INNER ...rather than ofINNER ... USING(...), but this is not possible in MySQL 5.PS2: Note that always total submissions >= accepted ones, and total views >= unique views, so it's enough to test sum(ts)>0 or sum(tv)>0 rather than the sum of all four.