From the course: Advanced Analytics Engineering: Real-World Practice

Unlock this course with a free trial

Join today to access over 25,500 courses taught by industry experts.

Solution: Create tests for data with SQL

Solution: Create tests for data with SQL

(bright upbeat music) - [Instructor] All right, here's our solution to this assessment. We're using our user_logins table. We start off by selecting login_id, user_id, login_timestamp, and we start extracting times or dates or parts of the date from this login_timestamp field. So we extract year from that, then we extract month. Next, we bring the name of the month as month_name, and we extract day and the name of the day. Then, we use our where clause to filter to just Saturday and Sunday. If you got this right, really great job. This was a challenging one. If you didn't get it right, that's okay. Keep practicing. You'll get it next time.

Contents