Comcast interview question

Asked to write queries and project code