Grant Street Group Interview Question

Basic sql, finding error in the code, solve a leetcode question(easy), javascript