Skip to content

Commit

Permalink
Update answers.sql
Browse files Browse the repository at this point in the history
  • Loading branch information
mobinni authored Oct 15, 2020
1 parent a4a0580 commit cd97c45
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions SQL Deep Dive/Group By/answers.sql
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@
* Table: Employees
*/

SELECT a.hire_date, COUNT(b.hire_date) as "amount"
FROM employees as a, employees as b
WHERE a.hire_date = b.hire_date
GROUP BY a.hire_date
SELECT hire_date, COUNT(hire_date) as "amount"
FROM employees
GROUP BY hire_date
ORDER BY "amount" DESC;

/*
Expand Down

0 comments on commit cd97c45

Please sign in to comment.