5 kyu
SQL Basics: Group By Day
7,549 of 7,550jhoffner
Description:
There is an events
table used to track different key activities taken on a website. For this task you need to:
- find the entries whose
name
equals"trained"
- group them by the
day
the activity happened (the date part of thecreated_at
timestamp) and theirdescription
's - the 2 aforementioned fields should be returned together with the number of grouped entries in a column called
count
- the result should also be sorted by
day
"events" table schema
id
(bigint)name
(text)created_at
(timestamp)description
(text)
expected result schema
day
(date)description
(text)count
(numeric)
SQL
Fundamentals
Similar Kata:
Stats:
Created | Oct 27, 2016 |
Published | Oct 27, 2016 |
Warriors Trained | 12092 |
Total Skips | 2114 |
Total Code Submissions | 33621 |
Total Times Completed | 7550 |
SQL Completions | 7549 |
Total Stars | 111 |
% of votes with a positive feedback rating | 78% of 905 |
Total "Very Satisfied" Votes | 600 |
Total "Somewhat Satisfied" Votes | 219 |
Total "Not Satisfied" Votes | 86 |
Total Rank Assessments | 13 |
Average Assessed Rank | 5 kyu |
Highest Assessed Rank | 5 kyu |
Lowest Assessed Rank | 7 kyu |