You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Most of your queries are correct, here are a few tips and corrections:
-- Find all the task that are marked as done
We can use Alias for table names to avoid typing long names repeatedly. select t.title, s.name from task t inner join status s on t.status_id = s.id where s.name ='Done';
selecttask.title, status.namefrom task inner join status ontask.status_id=status.idwherestatus.name='Done';
-- Get the names of all statuses, sorted by the status with most tasks first
We also need to sort in Descending order. select status.name, count(task.status_id) from task inner join status on task.status_id = status.id group by status.name order by count(task.status_id) desc;
Most of your queries are correct, here are a few tips and corrections:
-- Find all the task that are marked as done
We can use Alias for table names to avoid typing long names repeatedly.
select t.title, s.name from task t inner join status s on t.status_id = s.id where s.name ='Done';
hyf-homework/databases/week1/firstWeek.sql
Line 7 in 306e8b6
-- Get the names of all statuses, sorted by the status with most tasks first
We also need to sort in Descending order.
select status.name, count(task.status_id) from task inner join status on task.status_id = status.id group by status.name order by count(task.status_id) desc;
hyf-homework/databases/week1/firstWeek.sql
Lines 20 to 21 in 306e8b6
The text was updated successfully, but these errors were encountered: