Salary histogram
medium
Put the salaries into bands of 50000 (a salary of 120000 is in the band that starts at 100000). Return the start of each band that has people and the number of employees in it. Order by the band.
Tables Company
- departmentsid, name, city
- employeesid, name, dept_id, manager_id, title, salary, hire_date, commission
- projectsid, name, dept_id, budget, start_date
- assignmentsemployee_id, project_id, hours
Concepts
- histogram
- group by
Run shows your result on the sample data. Submit also runs the query on 2 other sets of data, so it has to be right in general: with ties, missing values (NULL) and rows that have nothing to join to.
Query
CompanyCtrl or Cmd + Enter runs it
Nothing run yet
Press Run to see your result on the sample data and compare it with the expected output. Submit checks it on the other data too.