5 kyu
SQL Basics: Group By Day
7,616 of 7,618jhoffner
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 | 12202 |
Total Skips | 2124 |
Total Code Submissions | 33890 |
Total Times Completed | 7618 |
SQL Completions | 7616 |
Total Stars | 113 |
% of votes with a positive feedback rating | 78% of 906 |
Total "Very Satisfied" Votes | 600 |
Total "Somewhat Satisfied" Votes | 220 |
Total "Not Satisfied" Votes | 86 |
Total Rank Assessments | 13 |
Average Assessed Rank | 5 kyu |
Highest Assessed Rank | 5 kyu |
Lowest Assessed Rank | 7 kyu |