In case you have your own slow SQL query, you can optimize it automatically here.
For the query above, the following recommendations will be helpful as part of the SQL tuning process.
You'll find 3 sections below:
CREATE INDEX employee_idx_dept_id ON "employee" ("dept_id");
SELECT
sum(employee.salary),
employee.dept_id
FROM
employee
GROUP BY
employee.dept_id
ORDER BY
sum(employee.salary) DESC LIMIT 2