Topic describes

The description has a salary sheet, and the outline is as follows:

Ask you to find the employee number emp_no and its corresponding record times t, the above example output is as follows:

Answer key

GROUP BY and GROUP HAVING

Elapsed time: 17ms over 52.75% Code submitted with Sqlite memory: 3320KB Over 57.91% code submitted with Sqlite

SELECT emp_no, COUNT(salary) AS t 
FROM salaries 
GROUP BY emp_no HAVING COUNT(salary) >= 15;
Copy the code