Adapt Ready Interview Question

Remove Duplicates (js), Sleep function in js, SQL postgres query