Question: display job Title, the difference between minimum and maximum salaries for those jobs which max salary within the range 12000 to 18000.

regions : region_id (number) , region_name (text) | countries : country_id (text) , country_name (text) , region_id (number) | departments : department_id (number) , department_name (text) , manager_id (number) , location_id (number) | jobs : job_id (text) , job_title (text) , min_salary (number) , max_salary (number) | employees : employee_id (number) , first_name (text) , last_name (text) , email (text) , phone_number (text) , hire_date (time) , job_id (text) , salary (number) , commission_pct (number) , manager_id (number) , department_id (number) | job_history : employee_id (number) , start_date (time) , end_date (time) , job_id (text) , department_id (number) | locations : location_id (number) , street_address (text) , postal_code (text) , city (text) , state_province (text) , country_id (text)

jobs : job_title (text) , max_salary (number) , min_salary (number) , job_id (number)


Question: What are the job titles, and range of salaries for jobs with maximum salary between 12000 and 18000?

regions : region_id (number) , region_name (text) | countries : country_id (text) , country_name (text) , region_id (number) | departments : department_id (number) , department_name (text) , manager_id (number) , location_id (number) | jobs : job_id (text) , job_title (text) , min_salary (number) , max_salary (number) | employees : employee_id (number) , first_name (text) , last_name (text) , email (text) , phone_number (text) , hire_date (time) , job_id (text) , salary (number) , commission_pct (number) , manager_id (number) , department_id (number) | job_history : employee_id (number) , start_date (time) , end_date (time) , job_id (text) , department_id (number) | locations : location_id (number) , street_address (text) , postal_code (text) , city (text) , state_province (text) , country_id (text)

jobs : job_title (text) , max_salary (number) , min_salary (number) , job_id (number)


Question: display the emails of the employees who have no commission percentage and salary within the range 7000 to 12000 and works in that department which number is 50.

regions : region_id (number) , region_name (text) | countries : country_id (text) , country_name (text) , region_id (number) | departments : department_id (number) , department_name (text) , manager_id (number) , location_id (number) | jobs : job_id (text) , job_title (text) , min_salary (number) , max_salary (number) | employees : employee_id (number) , first_name (text) , last_name (text) , email (text) , phone_number (text) , hire_date (time) , job_id (text) , salary (number) , commission_pct (number) , manager_id (number) , department_id (number) | job_history : employee_id (number) , start_date (time) , end_date (time) , job_id (text) , department_id (number) | locations : location_id (number) , street_address (text) , postal_code (text) , city (text) , state_province (text) , country_id (text)

employees : email (text) , commission_pct (number) , salary (number) , department_id (number) , employee_id (number) | departments : department_id (number) , department_id (number) | job_history : department_id (number) , employee_id (number)


Question: What are the emails of employees with null commission, salary between 7000 and 12000, and who work in department 50?

regions : region_id (number) , region_name (text) | countries : country_id (text) , country_name (text) , region_id (number) | departments : department_id (number) , department_name (text) , manager_id (number) , location_id (number) | jobs : job_id (text) , job_title (text) , min_salary (number) , max_salary (number) | employees : employee_id (number) , first_name (text) , last_name (text) , email (text) , phone_number (text) , hire_date (time) , job_id (text) , salary (number) , commission_pct (number) , manager_id (number) , department_id (number) | job_history : employee_id (number) , start_date (time) , end_date (time) , job_id (text) , department_id (number) | locations : location_id (number) , street_address (text) , postal_code (text) , city (text) , state_province (text) , country_id (text)

employees : email (text) , commission_pct (number) , salary (number) , department_id (number) , employee_id (number) | departments : department_id (number) , department_id (number) | job_history : department_id (number) , employee_id (number)


Question: display the employee ID for each employee and the date on which he ended his previous job.

regions : region_id (number) , region_name (text) | countries : country_id (text) , country_name (text) , region_id (number) | departments : department_id (number) , department_name (text) , manager_id (number) , location_id (number) | jobs : job_id (text) , job_title (text) , min_salary (number) , max_salary (number) | employees : employee_id (number) , first_name (text) , last_name (text) , email (text) , phone_number (text) , hire_date (time) , job_id (text) , salary (number) , commission_pct (number) , manager_id (number) , department_id (number) | job_history : employee_id (number) , start_date (time) , end_date (time) , job_id (text) , department_id (number) | locations : location_id (number) , street_address (text) , postal_code (text) , city (text) , state_province (text) , country_id (text)

employees : employee_id (number) , employee_id (number) | job_history : employee_id (number) , end_date (time) , employee_id (number)


Question: What are the employee ids for each employee and final dates of employment at their last job?

regions : region_id (number) , region_name (text) | countries : country_id (text) , country_name (text) , region_id (number) | departments : department_id (number) , department_name (text) , manager_id (number) , location_id (number) | jobs : job_id (text) , job_title (text) , min_salary (number) , max_salary (number) | employees : employee_id (number) , first_name (text) , last_name (text) , email (text) , phone_number (text) , hire_date (time) , job_id (text) , salary (number) , commission_pct (number) , manager_id (number) , department_id (number) | job_history : employee_id (number) , start_date (time) , end_date (time) , job_id (text) , department_id (number) | locations : location_id (number) , street_address (text) , postal_code (text) , city (text) , state_province (text) , country_id (text)

employees : employee_id (number) , employee_id (number) | job_history : employee_id (number) , end_date (time) , employee_id (number)


Question: display those departments where more than ten employees work who got a commission percentage.

regions : region_id (number) , region_name (text) | countries : country_id (text) , country_name (text) , region_id (number) | departments : department_id (number) , department_name (text) , manager_id (number) , location_id (number) | jobs : job_id (text) , job_title (text) , min_salary (number) , max_salary (number) | employees : employee_id (number) , first_name (text) , last_name (text) , email (text) , phone_number (text) , hire_date (time) , job_id (text) , salary (number) , commission_pct (number) , manager_id (number) , department_id (number) | job_history : employee_id (number) , start_date (time) , end_date (time) , job_id (text) , department_id (number) | locations : location_id (number) , street_address (text) , postal_code (text) , city (text) , state_province (text) , country_id (text)

departments : department_id (number) , department_id (number) | employees : department_id (number) , commission_pct (number) , employee_id (number) | job_history : department_id (number) , employee_id (number)


Question: What are the department ids for which more than 10 employees had a commission?

regions : region_id (number) , region_name (text) | countries : country_id (text) , country_name (text) , region_id (number) | departments : department_id (number) , department_name (text) , manager_id (number) , location_id (number) | jobs : job_id (text) , job_title (text) , min_salary (number) , max_salary (number) | employees : employee_id (number) , first_name (text) , last_name (text) , email (text) , phone_number (text) , hire_date (time) , job_id (text) , salary (number) , commission_pct (number) , manager_id (number) , department_id (number) | job_history : employee_id (number) , start_date (time) , end_date (time) , job_id (text) , department_id (number) | locations : location_id (number) , street_address (text) , postal_code (text) , city (text) , state_province (text) , country_id (text)

departments : department_id (number) , department_id (number) | employees : department_id (number) , commission_pct (number) , employee_id (number) | job_history : department_id (number) , employee_id (number)


Question: Find the ids of the departments where any manager is managing 4 or more employees.

regions : region_id (number) , region_name (text) | countries : country_id (text) , country_name (text) , region_id (number) | departments : department_id (number) , department_name (text) , manager_id (number) , location_id (number) | jobs : job_id (text) , job_title (text) , min_salary (number) , max_salary (number) | employees : employee_id (number) , first_name (text) , last_name (text) , email (text) , phone_number (text) , hire_date (time) , job_id (text) , salary (number) , commission_pct (number) , manager_id (number) , department_id (number) | job_history : employee_id (number) , start_date (time) , end_date (time) , job_id (text) , department_id (number) | locations : location_id (number) , street_address (text) , postal_code (text) , city (text) , state_province (text) , country_id (text)

departments : department_id (number) , manager_id (number) , department_id (number) | employees : department_id (number) , manager_id (number) , employee_id (number) , employee_id (number) | job_history : department_id (number) , employee_id (number) , employee_id (number)


Question: What are department ids for departments with managers managing more than 3 employees?

regions : region_id (number) , region_name (text) | countries : country_id (text) , country_name (text) , region_id (number) | departments : department_id (number) , department_name (text) , manager_id (number) , location_id (number) | jobs : job_id (text) , job_title (text) , min_salary (number) , max_salary (number) | employees : employee_id (number) , first_name (text) , last_name (text) , email (text) , phone_number (text) , hire_date (time) , job_id (text) , salary (number) , commission_pct (number) , manager_id (number) , department_id (number) | job_history : employee_id (number) , start_date (time) , end_date (time) , job_id (text) , department_id (number) | locations : location_id (number) , street_address (text) , postal_code (text) , city (text) , state_province (text) , country_id (text)

departments : department_id (number) , manager_id (number) , department_id (number) | employees : department_id (number) , manager_id (number) , employee_id (number) , employee_id (number) | job_history : department_id (number) , employee_id (number) , employee_id (number)


Question: display the average salary of employees for each department who gets a commission percentage.

regions : region_id (number) , region_name (text) | countries : country_id (text) , country_name (text) , region_id (number) | departments : department_id (number) , department_name (text) , manager_id (number) , location_id (number) | jobs : job_id (text) , job_title (text) , min_salary (number) , max_salary (number) | employees : employee_id (number) , first_name (text) , last_name (text) , email (text) , phone_number (text) , hire_date (time) , job_id (text) , salary (number) , commission_pct (number) , manager_id (number) , department_id (number) | job_history : employee_id (number) , start_date (time) , end_date (time) , job_id (text) , department_id (number) | locations : location_id (number) , street_address (text) , postal_code (text) , city (text) , state_province (text) , country_id (text)

departments : department_id (number) , department_id (number) | employees : department_id (number) , salary (number) , commission_pct (number) , employee_id (number) | job_history : department_id (number) , employee_id (number)


Question: What is the average salary of employees who have a commission percentage that is not null?

regions : region_id (number) , region_name (text) | countries : country_id (text) , country_name (text) , region_id (number) | departments : department_id (number) , department_name (text) , manager_id (number) , location_id (number) | jobs : job_id (text) , job_title (text) , min_salary (number) , max_salary (number) | employees : employee_id (number) , first_name (text) , last_name (text) , email (text) , phone_number (text) , hire_date (time) , job_id (text) , salary (number) , commission_pct (number) , manager_id (number) , department_id (number) | job_history : employee_id (number) , start_date (time) , end_date (time) , job_id (text) , department_id (number) | locations : location_id (number) , street_address (text) , postal_code (text) , city (text) , state_province (text) , country_id (text)

departments : department_id (number) , department_id (number) | employees : department_id (number) , salary (number) , commission_pct (number) , employee_id (number) | job_history : department_id (number) , employee_id (number)


Question: display the country ID and number of cities for each country.

regions : region_id (number) , region_name (text) | countries : country_id (text) , country_name (text) , region_id (number) | departments : department_id (number) , department_name (text) , manager_id (number) , location_id (number) | jobs : job_id (text) , job_title (text) , min_salary (number) , max_salary (number) | employees : employee_id (number) , first_name (text) , last_name (text) , email (text) , phone_number (text) , hire_date (time) , job_id (text) , salary (number) , commission_pct (number) , manager_id (number) , department_id (number) | job_history : employee_id (number) , start_date (time) , end_date (time) , job_id (text) , department_id (number) | locations : location_id (number) , street_address (text) , postal_code (text) , city (text) , state_province (text) , country_id (text)

countries : country_id (text) , country_id (number) | locations : country_id (text) , location_id (number)


Question: Give the country id and corresponding count of cities in each country.

regions : region_id (number) , region_name (text) | countries : country_id (text) , country_name (text) , region_id (number) | departments : department_id (number) , department_name (text) , manager_id (number) , location_id (number) | jobs : job_id (text) , job_title (text) , min_salary (number) , max_salary (number) | employees : employee_id (number) , first_name (text) , last_name (text) , email (text) , phone_number (text) , hire_date (time) , job_id (text) , salary (number) , commission_pct (number) , manager_id (number) , department_id (number) | job_history : employee_id (number) , start_date (time) , end_date (time) , job_id (text) , department_id (number) | locations : location_id (number) , street_address (text) , postal_code (text) , city (text) , state_province (text) , country_id (text)

countries : country_id (text) , country_id (number) | locations : country_id (text) , location_id (number)


Question: display job ID for those jobs that were done by two or more for more than 300 days.

regions : region_id (number) , region_name (text) | countries : country_id (text) , country_name (text) , region_id (number) | departments : department_id (number) , department_name (text) , manager_id (number) , location_id (number) | jobs : job_id (text) , job_title (text) , min_salary (number) , max_salary (number) | employees : employee_id (number) , first_name (text) , last_name (text) , email (text) , phone_number (text) , hire_date (time) , job_id (text) , salary (number) , commission_pct (number) , manager_id (number) , department_id (number) | job_history : employee_id (number) , start_date (time) , end_date (time) , job_id (text) , department_id (number) | locations : location_id (number) , street_address (text) , postal_code (text) , city (text) , state_province (text) , country_id (text)

jobs : job_id (text) , job_id (number) | employees : job_id (text) , employee_id (number) | job_history : job_id (text) , end_date (time) , start_date (time) , employee_id (number)


Question: What are the job ids for jobs done more than once for a period of more than 300 days?

regions : region_id (number) , region_name (text) | countries : country_id (text) , country_name (text) , region_id (number) | departments : department_id (number) , department_name (text) , manager_id (number) , location_id (number) | jobs : job_id (text) , job_title (text) , min_salary (number) , max_salary (number) | employees : employee_id (number) , first_name (text) , last_name (text) , email (text) , phone_number (text) , hire_date (time) , job_id (text) , salary (number) , commission_pct (number) , manager_id (number) , department_id (number) | job_history : employee_id (number) , start_date (time) , end_date (time) , job_id (text) , department_id (number) | locations : location_id (number) , street_address (text) , postal_code (text) , city (text) , state_province (text) , country_id (text)

jobs : job_id (text) , job_id (number) | employees : job_id (text) , employee_id (number) | job_history : job_id (text) , end_date (time) , start_date (time) , employee_id (number)


Question: display the ID for those employees who did two or more jobs in the past.

regions : region_id (number) , region_name (text) | countries : country_id (text) , country_name (text) , region_id (number) | departments : department_id (number) , department_name (text) , manager_id (number) , location_id (number) | jobs : job_id (text) , job_title (text) , min_salary (number) , max_salary (number) | employees : employee_id (number) , first_name (text) , last_name (text) , email (text) , phone_number (text) , hire_date (time) , job_id (text) , salary (number) , commission_pct (number) , manager_id (number) , department_id (number) | job_history : employee_id (number) , start_date (time) , end_date (time) , job_id (text) , department_id (number) | locations : location_id (number) , street_address (text) , postal_code (text) , city (text) , state_province (text) , country_id (text)

employees : employee_id (number) , employee_id (number) | job_history : employee_id (number) , employee_id (number)


Question: What are the employee ids for employees who have held two or more jobs?

regions : region_id (number) , region_name (text) | countries : country_id (text) , country_name (text) , region_id (number) | departments : department_id (number) , department_name (text) , manager_id (number) , location_id (number) | jobs : job_id (text) , job_title (text) , min_salary (number) , max_salary (number) | employees : employee_id (number) , first_name (text) , last_name (text) , email (text) , phone_number (text) , hire_date (time) , job_id (text) , salary (number) , commission_pct (number) , manager_id (number) , department_id (number) | job_history : employee_id (number) , start_date (time) , end_date (time) , job_id (text) , department_id (number) | locations : location_id (number) , street_address (text) , postal_code (text) , city (text) , state_province (text) , country_id (text)

employees : employee_id (number) , employee_id (number) | job_history : employee_id (number) , employee_id (number)


Question: Find employee with ID and name of the country presently where (s)he is working.

regions : region_id (number) , region_name (text) | countries : country_id (text) , country_name (text) , region_id (number) | departments : department_id (number) , department_name (text) , manager_id (number) , location_id (number) | jobs : job_id (text) , job_title (text) , min_salary (number) , max_salary (number) | employees : employee_id (number) , first_name (text) , last_name (text) , email (text) , phone_number (text) , hire_date (time) , job_id (text) , salary (number) , commission_pct (number) , manager_id (number) , department_id (number) | job_history : employee_id (number) , start_date (time) , end_date (time) , job_id (text) , department_id (number) | locations : location_id (number) , street_address (text) , postal_code (text) , city (text) , state_province (text) , country_id (text)

employees : employee_id (number) , department_id (number) , employee_id (number) | job_history : employee_id (number) , department_id (number) , employee_id (number) | countries : country_name (text) , country_id (text) , country_id (number) | departments : department_id (number) , location_id (number) , department_id (number) | locations : location_id (number) , country_id (text) , location_id (number)


Question: What are all the employee ids and the names of the countries in which they work?

regions : region_id (number) , region_name (text) | countries : country_id (text) , country_name (text) , region_id (number) | departments : department_id (number) , department_name (text) , manager_id (number) , location_id (number) | jobs : job_id (text) , job_title (text) , min_salary (number) , max_salary (number) | employees : employee_id (number) , first_name (text) , last_name (text) , email (text) , phone_number (text) , hire_date (time) , job_id (text) , salary (number) , commission_pct (number) , manager_id (number) , department_id (number) | job_history : employee_id (number) , start_date (time) , end_date (time) , job_id (text) , department_id (number) | locations : location_id (number) , street_address (text) , postal_code (text) , city (text) , state_province (text) , country_id (text)

employees : employee_id (number) , department_id (number) , employee_id (number) | job_history : employee_id (number) , department_id (number) , employee_id (number) | countries : country_name (text) , country_id (text) , country_id (number) | departments : department_id (number) , location_id (number) , department_id (number) | locations : location_id (number) , country_id (text) , location_id (number)


Question: display the department name and number of employees in each of the department.

regions : region_id (number) , region_name (text) | countries : country_id (text) , country_name (text) , region_id (number) | departments : department_id (number) , department_name (text) , manager_id (number) , location_id (number) | jobs : job_id (text) , job_title (text) , min_salary (number) , max_salary (number) | employees : employee_id (number) , first_name (text) , last_name (text) , email (text) , phone_number (text) , hire_date (time) , job_id (text) , salary (number) , commission_pct (number) , manager_id (number) , department_id (number) | job_history : employee_id (number) , start_date (time) , end_date (time) , job_id (text) , department_id (number) | locations : location_id (number) , street_address (text) , postal_code (text) , city (text) , state_province (text) , country_id (text)

departments : department_name (text) , department_id (number) , department_id (number) | employees : department_id (number) , employee_id (number) | job_history : department_id (number) , employee_id (number)


Question: Give the name of each department and the number of employees in each.

regions : region_id (number) , region_name (text) | countries : country_id (text) , country_name (text) , region_id (number) | departments : department_id (number) , department_name (text) , manager_id (number) , location_id (number) | jobs : job_id (text) , job_title (text) , min_salary (number) , max_salary (number) | employees : employee_id (number) , first_name (text) , last_name (text) , email (text) , phone_number (text) , hire_date (time) , job_id (text) , salary (number) , commission_pct (number) , manager_id (number) , department_id (number) | job_history : employee_id (number) , start_date (time) , end_date (time) , job_id (text) , department_id (number) | locations : location_id (number) , street_address (text) , postal_code (text) , city (text) , state_province (text) , country_id (text)

departments : department_name (text) , department_id (number) , department_id (number) | employees : department_id (number) , employee_id (number) | job_history : department_id (number) , employee_id (number)


Question: Can you return all detailed info of jobs which was done by any of the employees who is presently earning a salary on and above 12000?

regions : region_id (number) , region_name (text) | countries : country_id (text) , country_name (text) , region_id (number) | departments : department_id (number) , department_name (text) , manager_id (number) , location_id (number) | jobs : job_id (text) , job_title (text) , min_salary (number) , max_salary (number) | employees : employee_id (number) , first_name (text) , last_name (text) , email (text) , phone_number (text) , hire_date (time) , job_id (text) , salary (number) , commission_pct (number) , manager_id (number) , department_id (number) | job_history : employee_id (number) , start_date (time) , end_date (time) , job_id (text) , department_id (number) | locations : location_id (number) , street_address (text) , postal_code (text) , city (text) , state_province (text) , country_id (text)

employees : employee_id (number) , salary (number) , employee_id (number) | job_history : employee_id (number) , employee_id (number)


Question: What is all the job history info done by employees earning a salary greater than or equal to 12000?

regions : region_id (number) , region_name (text) | countries : country_id (text) , country_name (text) , region_id (number) | departments : department_id (number) , department_name (text) , manager_id (number) , location_id (number) | jobs : job_id (text) , job_title (text) , min_salary (number) , max_salary (number) | employees : employee_id (number) , first_name (text) , last_name (text) , email (text) , phone_number (text) , hire_date (time) , job_id (text) , salary (number) , commission_pct (number) , manager_id (number) , department_id (number) | job_history : employee_id (number) , start_date (time) , end_date (time) , job_id (text) , department_id (number) | locations : location_id (number) , street_address (text) , postal_code (text) , city (text) , state_province (text) , country_id (text)

employees : employee_id (number) , salary (number) , employee_id (number) | job_history : employee_id (number) , employee_id (number)


Question: display job title and average salary of employees.

regions : region_id (number) , region_name (text) | countries : country_id (text) , country_name (text) , region_id (number) | departments : department_id (number) , department_name (text) , manager_id (number) , location_id (number) | jobs : job_id (text) , job_title (text) , min_salary (number) , max_salary (number) | employees : employee_id (number) , first_name (text) , last_name (text) , email (text) , phone_number (text) , hire_date (time) , job_id (text) , salary (number) , commission_pct (number) , manager_id (number) , department_id (number) | job_history : employee_id (number) , start_date (time) , end_date (time) , job_id (text) , department_id (number) | locations : location_id (number) , street_address (text) , postal_code (text) , city (text) , state_province (text) , country_id (text)

jobs : job_title (text) , job_id (text) , job_id (number) | employees : salary (number) , job_id (text) , employee_id (number) | job_history : job_id (text) , employee_id (number)


Question: What is the average salary for each job title?

regions : region_id (number) , region_name (text) | countries : country_id (text) , country_name (text) , region_id (number) | departments : department_id (number) , department_name (text) , manager_id (number) , location_id (number) | jobs : job_id (text) , job_title (text) , min_salary (number) , max_salary (number) | employees : employee_id (number) , first_name (text) , last_name (text) , email (text) , phone_number (text) , hire_date (time) , job_id (text) , salary (number) , commission_pct (number) , manager_id (number) , department_id (number) | job_history : employee_id (number) , start_date (time) , end_date (time) , job_id (text) , department_id (number) | locations : location_id (number) , street_address (text) , postal_code (text) , city (text) , state_province (text) , country_id (text)

jobs : job_title (text) , job_id (text) , job_id (number) | employees : salary (number) , job_id (text) , employee_id (number) | job_history : job_id (text) , employee_id (number)


Question: What is the full name ( first name and last name ) for those employees who gets more salary than the employee whose id is 163?

regions : region_id (number) , region_name (text) | countries : country_id (text) , country_name (text) , region_id (number) | departments : department_id (number) , department_name (text) , manager_id (number) , location_id (number) | jobs : job_id (text) , job_title (text) , min_salary (number) , max_salary (number) | employees : employee_id (number) , first_name (text) , last_name (text) , email (text) , phone_number (text) , hire_date (time) , job_id (text) , salary (number) , commission_pct (number) , manager_id (number) , department_id (number) | job_history : employee_id (number) , start_date (time) , end_date (time) , job_id (text) , department_id (number) | locations : location_id (number) , street_address (text) , postal_code (text) , city (text) , state_province (text) , country_id (text)

employees : first_name (text) , last_name (text) , salary (number) , employee_id (number) , employee_id (number) | job_history : employee_id (number) , employee_id (number)


Question: Provide the full names of employees earning more than the employee with id 163.

regions : region_id (number) , region_name (text) | countries : country_id (text) , country_name (text) , region_id (number) | departments : department_id (number) , department_name (text) , manager_id (number) , location_id (number) | jobs : job_id (text) , job_title (text) , min_salary (number) , max_salary (number) | employees : employee_id (number) , first_name (text) , last_name (text) , email (text) , phone_number (text) , hire_date (time) , job_id (text) , salary (number) , commission_pct (number) , manager_id (number) , department_id (number) | job_history : employee_id (number) , start_date (time) , end_date (time) , job_id (text) , department_id (number) | locations : location_id (number) , street_address (text) , postal_code (text) , city (text) , state_province (text) , country_id (text)

employees : first_name (text) , last_name (text) , salary (number) , employee_id (number) , employee_id (number) | job_history : employee_id (number) , employee_id (number)


Question: return the smallest salary for every departments.

regions : region_id (number) , region_name (text) | countries : country_id (text) , country_name (text) , region_id (number) | departments : department_id (number) , department_name (text) , manager_id (number) , location_id (number) | jobs : job_id (text) , job_title (text) , min_salary (number) , max_salary (number) | employees : employee_id (number) , first_name (text) , last_name (text) , email (text) , phone_number (text) , hire_date (time) , job_id (text) , salary (number) , commission_pct (number) , manager_id (number) , department_id (number) | job_history : employee_id (number) , start_date (time) , end_date (time) , job_id (text) , department_id (number) | locations : location_id (number) , street_address (text) , postal_code (text) , city (text) , state_province (text) , country_id (text)

employees : salary (number) , department_id (number) , employee_id (number) | departments : department_id (number) , department_id (number) | job_history : department_id (number) , employee_id (number)


Question: What is the minimum salary in each department?

regions : region_id (number) , region_name (text) | countries : country_id (text) , country_name (text) , region_id (number) | departments : department_id (number) , department_name (text) , manager_id (number) , location_id (number) | jobs : job_id (text) , job_title (text) , min_salary (number) , max_salary (number) | employees : employee_id (number) , first_name (text) , last_name (text) , email (text) , phone_number (text) , hire_date (time) , job_id (text) , salary (number) , commission_pct (number) , manager_id (number) , department_id (number) | job_history : employee_id (number) , start_date (time) , end_date (time) , job_id (text) , department_id (number) | locations : location_id (number) , street_address (text) , postal_code (text) , city (text) , state_province (text) , country_id (text)

employees : salary (number) , department_id (number) , employee_id (number) | departments : department_id (number) , department_id (number) | job_history : department_id (number) , employee_id (number)


Question: Find the first name and last name and department id for those employees who earn such amount of salary which is the smallest salary of any of the departments.

regions : region_id (number) , region_name (text) | countries : country_id (text) , country_name (text) , region_id (number) | departments : department_id (number) , department_name (text) , manager_id (number) , location_id (number) | jobs : job_id (text) , job_title (text) , min_salary (number) , max_salary (number) | employees : employee_id (number) , first_name (text) , last_name (text) , email (text) , phone_number (text) , hire_date (time) , job_id (text) , salary (number) , commission_pct (number) , manager_id (number) , department_id (number) | job_history : employee_id (number) , start_date (time) , end_date (time) , job_id (text) , department_id (number) | locations : location_id (number) , street_address (text) , postal_code (text) , city (text) , state_province (text) , country_id (text)

employees : first_name (text) , last_name (text) , department_id (number) , salary (number) , employee_id (number) | departments : department_id (number) , department_id (number) | job_history : department_id (number) , employee_id (number)


Question: What are the full names and department ids for the lowest paid employees across all departments.

regions : region_id (number) , region_name (text) | countries : country_id (text) , country_name (text) , region_id (number) | departments : department_id (number) , department_name (text) , manager_id (number) , location_id (number) | jobs : job_id (text) , job_title (text) , min_salary (number) , max_salary (number) | employees : employee_id (number) , first_name (text) , last_name (text) , email (text) , phone_number (text) , hire_date (time) , job_id (text) , salary (number) , commission_pct (number) , manager_id (number) , department_id (number) | job_history : employee_id (number) , start_date (time) , end_date (time) , job_id (text) , department_id (number) | locations : location_id (number) , street_address (text) , postal_code (text) , city (text) , state_province (text) , country_id (text)

employees : first_name (text) , last_name (text) , department_id (number) , salary (number) , employee_id (number) | departments : department_id (number) , department_id (number) | job_history : department_id (number) , employee_id (number)


Question: Find the employee id for all employees who earn more than the average salary.

regions : region_id (number) , region_name (text) | countries : country_id (text) , country_name (text) , region_id (number) | departments : department_id (number) , department_name (text) , manager_id (number) , location_id (number) | jobs : job_id (text) , job_title (text) , min_salary (number) , max_salary (number) | employees : employee_id (number) , first_name (text) , last_name (text) , email (text) , phone_number (text) , hire_date (time) , job_id (text) , salary (number) , commission_pct (number) , manager_id (number) , department_id (number) | job_history : employee_id (number) , start_date (time) , end_date (time) , job_id (text) , department_id (number) | locations : location_id (number) , street_address (text) , postal_code (text) , city (text) , state_province (text) , country_id (text)

employees : employee_id (number) , salary (number) , employee_id (number) | job_history : employee_id (number) , employee_id (number)


Question: What are the employee ids for employees who make more than the average?

regions : region_id (number) , region_name (text) | countries : country_id (text) , country_name (text) , region_id (number) | departments : department_id (number) , department_name (text) , manager_id (number) , location_id (number) | jobs : job_id (text) , job_title (text) , min_salary (number) , max_salary (number) | employees : employee_id (number) , first_name (text) , last_name (text) , email (text) , phone_number (text) , hire_date (time) , job_id (text) , salary (number) , commission_pct (number) , manager_id (number) , department_id (number) | job_history : employee_id (number) , start_date (time) , end_date (time) , job_id (text) , department_id (number) | locations : location_id (number) , street_address (text) , postal_code (text) , city (text) , state_province (text) , country_id (text)

employees : employee_id (number) , salary (number) , employee_id (number) | job_history : employee_id (number) , employee_id (number)


Question: display the employee id and salary of all employees who report to Payam (first name).

regions : region_id (number) , region_name (text) | countries : country_id (text) , country_name (text) , region_id (number) | departments : department_id (number) , department_name (text) , manager_id (number) , location_id (number) | jobs : job_id (text) , job_title (text) , min_salary (number) , max_salary (number) | employees : employee_id (number) , first_name (text) , last_name (text) , email (text) , phone_number (text) , hire_date (time) , job_id (text) , salary (number) , commission_pct (number) , manager_id (number) , department_id (number) | job_history : employee_id (number) , start_date (time) , end_date (time) , job_id (text) , department_id (number) | locations : location_id (number) , street_address (text) , postal_code (text) , city (text) , state_province (text) , country_id (text)

employees : employee_id (number) , salary (number) , manager_id (number) , first_name (text) , employee_id (number) | job_history : employee_id (number) , employee_id (number) | departments : manager_id (number) , department_id (number)


Question: What are the employee ids of employees who report to Payam, and what are their salaries?

regions : region_id (number) , region_name (text) | countries : country_id (text) , country_name (text) , region_id (number) | departments : department_id (number) , department_name (text) , manager_id (number) , location_id (number) | jobs : job_id (text) , job_title (text) , min_salary (number) , max_salary (number) | employees : employee_id (number) , first_name (text) , last_name (text) , email (text) , phone_number (text) , hire_date (time) , job_id (text) , salary (number) , commission_pct (number) , manager_id (number) , department_id (number) | job_history : employee_id (number) , start_date (time) , end_date (time) , job_id (text) , department_id (number) | locations : location_id (number) , street_address (text) , postal_code (text) , city (text) , state_province (text) , country_id (text)

employees : employee_id (number) , salary (number) , manager_id (number) , first_name (text) , employee_id (number) | job_history : employee_id (number) , employee_id (number) | departments : manager_id (number) , department_id (number)


Question: find the name of all departments that do actually have one or more employees assigned to them.

regions : region_id (number) , region_name (text) | countries : country_id (text) , country_name (text) , region_id (number) | departments : department_id (number) , department_name (text) , manager_id (number) , location_id (number) | jobs : job_id (text) , job_title (text) , min_salary (number) , max_salary (number) | employees : employee_id (number) , first_name (text) , last_name (text) , email (text) , phone_number (text) , hire_date (time) , job_id (text) , salary (number) , commission_pct (number) , manager_id (number) , department_id (number) | job_history : employee_id (number) , start_date (time) , end_date (time) , job_id (text) , department_id (number) | locations : location_id (number) , street_address (text) , postal_code (text) , city (text) , state_province (text) , country_id (text)

departments : department_name (text) , department_id (number) , department_id (number) | employees : department_id (number) , employee_id (number) | job_history : department_id (number) , employee_id (number)


Question: What are the names of departments that have at least one employee.

regions : region_id (number) , region_name (text) | countries : country_id (text) , country_name (text) , region_id (number) | departments : department_id (number) , department_name (text) , manager_id (number) , location_id (number) | jobs : job_id (text) , job_title (text) , min_salary (number) , max_salary (number) | employees : employee_id (number) , first_name (text) , last_name (text) , email (text) , phone_number (text) , hire_date (time) , job_id (text) , salary (number) , commission_pct (number) , manager_id (number) , department_id (number) | job_history : employee_id (number) , start_date (time) , end_date (time) , job_id (text) , department_id (number) | locations : location_id (number) , street_address (text) , postal_code (text) , city (text) , state_province (text) , country_id (text)

departments : department_name (text) , department_id (number) , department_id (number) | employees : department_id (number) , employee_id (number) | job_history : department_id (number) , employee_id (number)


Question: get the details of employees who manage a department.

regions : region_id (number) , region_name (text) | countries : country_id (text) , country_name (text) , region_id (number) | departments : department_id (number) , department_name (text) , manager_id (number) , location_id (number) | jobs : job_id (text) , job_title (text) , min_salary (number) , max_salary (number) | employees : employee_id (number) , first_name (text) , last_name (text) , email (text) , phone_number (text) , hire_date (time) , job_id (text) , salary (number) , commission_pct (number) , manager_id (number) , department_id (number) | job_history : employee_id (number) , start_date (time) , end_date (time) , job_id (text) , department_id (number) | locations : location_id (number) , street_address (text) , postal_code (text) , city (text) , state_province (text) , country_id (text)

departments : department_id (number) , manager_id (number) , department_id (number) | employees : department_id (number) , employee_id (number) , manager_id (number) , employee_id (number) | job_history : department_id (number) , employee_id (number) , employee_id (number)


Question: What is all the information regarding employees who are managers?

regions : region_id (number) , region_name (text) | countries : country_id (text) , country_name (text) , region_id (number) | departments : department_id (number) , department_name (text) , manager_id (number) , location_id (number) | jobs : job_id (text) , job_title (text) , min_salary (number) , max_salary (number) | employees : employee_id (number) , first_name (text) , last_name (text) , email (text) , phone_number (text) , hire_date (time) , job_id (text) , salary (number) , commission_pct (number) , manager_id (number) , department_id (number) | job_history : employee_id (number) , start_date (time) , end_date (time) , job_id (text) , department_id (number) | locations : location_id (number) , street_address (text) , postal_code (text) , city (text) , state_province (text) , country_id (text)

departments : department_id (number) , manager_id (number) , department_id (number) | employees : department_id (number) , employee_id (number) , manager_id (number) , employee_id (number) | job_history : department_id (number) , employee_id (number) , employee_id (number)


Question: display all the information about the department Marketing.

regions : region_id (number) , region_name (text) | countries : country_id (text) , country_name (text) , region_id (number) | departments : department_id (number) , department_name (text) , manager_id (number) , location_id (number) | jobs : job_id (text) , job_title (text) , min_salary (number) , max_salary (number) | employees : employee_id (number) , first_name (text) , last_name (text) , email (text) , phone_number (text) , hire_date (time) , job_id (text) , salary (number) , commission_pct (number) , manager_id (number) , department_id (number) | job_history : employee_id (number) , start_date (time) , end_date (time) , job_id (text) , department_id (number) | locations : location_id (number) , street_address (text) , postal_code (text) , city (text) , state_province (text) , country_id (text)

departments : department_name (text) , department_id (number)


Question: What is all the information about the Marketing department?

regions : region_id (number) , region_name (text) | countries : country_id (text) , country_name (text) , region_id (number) | departments : department_id (number) , department_name (text) , manager_id (number) , location_id (number) | jobs : job_id (text) , job_title (text) , min_salary (number) , max_salary (number) | employees : employee_id (number) , first_name (text) , last_name (text) , email (text) , phone_number (text) , hire_date (time) , job_id (text) , salary (number) , commission_pct (number) , manager_id (number) , department_id (number) | job_history : employee_id (number) , start_date (time) , end_date (time) , job_id (text) , department_id (number) | locations : location_id (number) , street_address (text) , postal_code (text) , city (text) , state_province (text) , country_id (text)

departments : department_name (text) , department_id (number)


Question: display the ID for those employees who did two or more jobs in the past.

regions : region_id (number) , region_name (text) | countries : country_id (text) , country_name (text) , region_id (number) | departments : department_id (number) , department_name (text) , manager_id (number) , location_id (number) | jobs : job_id (text) , job_title (text) , min_salary (number) , max_salary (number) | employees : employee_id (number) , first_name (text) , last_name (text) , email (text) , phone_number (text) , hire_date (time) , job_id (text) , salary (number) , commission_pct (number) , manager_id (number) , department_id (number) | job_history : employee_id (number) , start_date (time) , end_date (time) , job_id (text) , department_id (number) | locations : location_id (number) , street_address (text) , postal_code (text) , city (text) , state_province (text) , country_id (text)

employees : employee_id (number) , employee_id (number) | job_history : employee_id (number) , employee_id (number)


Question: What are the employee ids for those who had two or more jobs.

regions : region_id (number) , region_name (text) | countries : country_id (text) , country_name (text) , region_id (number) | departments : department_id (number) , department_name (text) , manager_id (number) , location_id (number) | jobs : job_id (text) , job_title (text) , min_salary (number) , max_salary (number) | employees : employee_id (number) , first_name (text) , last_name (text) , email (text) , phone_number (text) , hire_date (time) , job_id (text) , salary (number) , commission_pct (number) , manager_id (number) , department_id (number) | job_history : employee_id (number) , start_date (time) , end_date (time) , job_id (text) , department_id (number) | locations : location_id (number) , street_address (text) , postal_code (text) , city (text) , state_province (text) , country_id (text)

employees : employee_id (number) , employee_id (number) | job_history : employee_id (number) , employee_id (number)


Question: What are the unique ids of those departments where any manager is managing 4 or more employees.

regions : region_id (number) , region_name (text) | countries : country_id (text) , country_name (text) , region_id (number) | departments : department_id (number) , department_name (text) , manager_id (number) , location_id (number) | jobs : job_id (text) , job_title (text) , min_salary (number) , max_salary (number) | employees : employee_id (number) , first_name (text) , last_name (text) , email (text) , phone_number (text) , hire_date (time) , job_id (text) , salary (number) , commission_pct (number) , manager_id (number) , department_id (number) | job_history : employee_id (number) , start_date (time) , end_date (time) , job_id (text) , department_id (number) | locations : location_id (number) , street_address (text) , postal_code (text) , city (text) , state_province (text) , country_id (text)

departments : department_id (number) , manager_id (number) , department_id (number) | employees : department_id (number) , manager_id (number) , employee_id (number) , employee_id (number) | job_history : department_id (number) , employee_id (number) , employee_id (number)


Question: Give the distinct department ids of departments in which a manager is in charge of 4 or more employees?

regions : region_id (number) , region_name (text) | countries : country_id (text) , country_name (text) , region_id (number) | departments : department_id (number) , department_name (text) , manager_id (number) , location_id (number) | jobs : job_id (text) , job_title (text) , min_salary (number) , max_salary (number) | employees : employee_id (number) , first_name (text) , last_name (text) , email (text) , phone_number (text) , hire_date (time) , job_id (text) , salary (number) , commission_pct (number) , manager_id (number) , department_id (number) | job_history : employee_id (number) , start_date (time) , end_date (time) , job_id (text) , department_id (number) | locations : location_id (number) , street_address (text) , postal_code (text) , city (text) , state_province (text) , country_id (text)

departments : department_id (number) , manager_id (number) , department_id (number) | employees : department_id (number) , manager_id (number) , employee_id (number) , employee_id (number) | job_history : department_id (number) , employee_id (number) , employee_id (number)


Question: Find the job ID for those jobs which average salary is above 8000.

regions : region_id (number) , region_name (text) | countries : country_id (text) , country_name (text) , region_id (number) | departments : department_id (number) , department_name (text) , manager_id (number) , location_id (number) | jobs : job_id (text) , job_title (text) , min_salary (number) , max_salary (number) | employees : employee_id (number) , first_name (text) , last_name (text) , email (text) , phone_number (text) , hire_date (time) , job_id (text) , salary (number) , commission_pct (number) , manager_id (number) , department_id (number) | job_history : employee_id (number) , start_date (time) , end_date (time) , job_id (text) , department_id (number) | locations : location_id (number) , street_address (text) , postal_code (text) , city (text) , state_province (text) , country_id (text)

jobs : job_id (text) , job_id (number) | employees : job_id (text) , salary (number) , employee_id (number) | job_history : job_id (text) , employee_id (number)


Question: What are the job ids corresponding to jobs with average salary above 8000?

regions : region_id (number) , region_name (text) | countries : country_id (text) , country_name (text) , region_id (number) | departments : department_id (number) , department_name (text) , manager_id (number) , location_id (number) | jobs : job_id (text) , job_title (text) , min_salary (number) , max_salary (number) | employees : employee_id (number) , first_name (text) , last_name (text) , email (text) , phone_number (text) , hire_date (time) , job_id (text) , salary (number) , commission_pct (number) , manager_id (number) , department_id (number) | job_history : employee_id (number) , start_date (time) , end_date (time) , job_id (text) , department_id (number) | locations : location_id (number) , street_address (text) , postal_code (text) , city (text) , state_province (text) , country_id (text)

jobs : job_id (text) , job_id (number) | employees : job_id (text) , salary (number) , employee_id (number) | job_history : job_id (text) , employee_id (number)


Question: display the employee ID and job name for all those jobs in department 80.

regions : region_id (number) , region_name (text) | countries : country_id (text) , country_name (text) , region_id (number) | departments : department_id (number) , department_name (text) , manager_id (number) , location_id (number) | jobs : job_id (text) , job_title (text) , min_salary (number) , max_salary (number) | employees : employee_id (number) , first_name (text) , last_name (text) , email (text) , phone_number (text) , hire_date (time) , job_id (text) , salary (number) , commission_pct (number) , manager_id (number) , department_id (number) | job_history : employee_id (number) , start_date (time) , end_date (time) , job_id (text) , department_id (number) | locations : location_id (number) , street_address (text) , postal_code (text) , city (text) , state_province (text) , country_id (text)

employees : employee_id (number) , job_id (text) , department_id (number) , employee_id (number) | job_history : employee_id (number) , job_id (text) , department_id (number) , employee_id (number) | jobs : job_title (text) , job_id (text) , job_id (number) | departments : department_id (number) , department_id (number)


Question: what are the employee ids and job titles for employees in department 80?

regions : region_id (number) , region_name (text) | countries : country_id (text) , country_name (text) , region_id (number) | departments : department_id (number) , department_name (text) , manager_id (number) , location_id (number) | jobs : job_id (text) , job_title (text) , min_salary (number) , max_salary (number) | employees : employee_id (number) , first_name (text) , last_name (text) , email (text) , phone_number (text) , hire_date (time) , job_id (text) , salary (number) , commission_pct (number) , manager_id (number) , department_id (number) | job_history : employee_id (number) , start_date (time) , end_date (time) , job_id (text) , department_id (number) | locations : location_id (number) , street_address (text) , postal_code (text) , city (text) , state_province (text) , country_id (text)

employees : employee_id (number) , job_id (text) , department_id (number) , employee_id (number) | job_history : employee_id (number) , job_id (text) , department_id (number) , employee_id (number) | jobs : job_title (text) , job_id (text) , job_id (number) | departments : department_id (number) , department_id (number)


Question: What is the first name and job id for all employees in the Finance department?

regions : region_id (number) , region_name (text) | countries : country_id (text) , country_name (text) , region_id (number) | departments : department_id (number) , department_name (text) , manager_id (number) , location_id (number) | jobs : job_id (text) , job_title (text) , min_salary (number) , max_salary (number) | employees : employee_id (number) , first_name (text) , last_name (text) , email (text) , phone_number (text) , hire_date (time) , job_id (text) , salary (number) , commission_pct (number) , manager_id (number) , department_id (number) | job_history : employee_id (number) , start_date (time) , end_date (time) , job_id (text) , department_id (number) | locations : location_id (number) , street_address (text) , postal_code (text) , city (text) , state_province (text) , country_id (text)

employees : first_name (text) , job_id (text) , department_id (number) , employee_id (number) | jobs : job_id (text) , job_id (number) | job_history : job_id (text) , department_id (number) , employee_id (number) | departments : department_id (number) , department_name (text) , department_id (number)


Question: Give the first name and job id for all employees in the Finance department.

regions : region_id (number) , region_name (text) | countries : country_id (text) , country_name (text) , region_id (number) | departments : department_id (number) , department_name (text) , manager_id (number) , location_id (number) | jobs : job_id (text) , job_title (text) , min_salary (number) , max_salary (number) | employees : employee_id (number) , first_name (text) , last_name (text) , email (text) , phone_number (text) , hire_date (time) , job_id (text) , salary (number) , commission_pct (number) , manager_id (number) , department_id (number) | job_history : employee_id (number) , start_date (time) , end_date (time) , job_id (text) , department_id (number) | locations : location_id (number) , street_address (text) , postal_code (text) , city (text) , state_province (text) , country_id (text)

employees : first_name (text) , job_id (text) , department_id (number) , employee_id (number) | jobs : job_id (text) , job_id (number) | job_history : job_id (text) , department_id (number) , employee_id (number) | departments : department_id (number) , department_name (text) , department_id (number)


Question: display all the information of the employees whose salary if within the range of smallest salary and 2500.

regions : region_id (number) , region_name (text) | countries : country_id (text) , country_name (text) , region_id (number) | departments : department_id (number) , department_name (text) , manager_id (number) , location_id (number) | jobs : job_id (text) , job_title (text) , min_salary (number) , max_salary (number) | employees : employee_id (number) , first_name (text) , last_name (text) , email (text) , phone_number (text) , hire_date (time) , job_id (text) , salary (number) , commission_pct (number) , manager_id (number) , department_id (number) | job_history : employee_id (number) , start_date (time) , end_date (time) , job_id (text) , department_id (number) | locations : location_id (number) , street_address (text) , postal_code (text) , city (text) , state_province (text) , country_id (text)

employees : salary (number) , employee_id (number)


Question: What is all the information regarding employees with salaries above the minimum and under 2500?

regions : region_id (number) , region_name (text) | countries : country_id (text) , country_name (text) , region_id (number) | departments : department_id (number) , department_name (text) , manager_id (number) , location_id (number) | jobs : job_id (text) , job_title (text) , min_salary (number) , max_salary (number) | employees : employee_id (number) , first_name (text) , last_name (text) , email (text) , phone_number (text) , hire_date (time) , job_id (text) , salary (number) , commission_pct (number) , manager_id (number) , department_id (number) | job_history : employee_id (number) , start_date (time) , end_date (time) , job_id (text) , department_id (number) | locations : location_id (number) , street_address (text) , postal_code (text) , city (text) , state_province (text) , country_id (text)

employees : salary (number) , employee_id (number)


Question: Find the ids of the employees who does not work in those departments where some employees works whose manager id within the range 100 and 200.

regions : region_id (number) , region_name (text) | countries : country_id (text) , country_name (text) , region_id (number) | departments : department_id (number) , department_name (text) , manager_id (number) , location_id (number) | jobs : job_id (text) , job_title (text) , min_salary (number) , max_salary (number) | employees : employee_id (number) , first_name (text) , last_name (text) , email (text) , phone_number (text) , hire_date (time) , job_id (text) , salary (number) , commission_pct (number) , manager_id (number) , department_id (number) | job_history : employee_id (number) , start_date (time) , end_date (time) , job_id (text) , department_id (number) | locations : location_id (number) , street_address (text) , postal_code (text) , city (text) , state_province (text) , country_id (text)

departments : department_id (number) , manager_id (number) , department_id (number) | employees : department_id (number) , manager_id (number) , employee_id (number) | job_history : department_id (number) , employee_id (number)


Question: What are the ids for employees who do not work in departments with managers that have ids between 100 and 200?

regions : region_id (number) , region_name (text) | countries : country_id (text) , country_name (text) , region_id (number) | departments : department_id (number) , department_name (text) , manager_id (number) , location_id (number) | jobs : job_id (text) , job_title (text) , min_salary (number) , max_salary (number) | employees : employee_id (number) , first_name (text) , last_name (text) , email (text) , phone_number (text) , hire_date (time) , job_id (text) , salary (number) , commission_pct (number) , manager_id (number) , department_id (number) | job_history : employee_id (number) , start_date (time) , end_date (time) , job_id (text) , department_id (number) | locations : location_id (number) , street_address (text) , postal_code (text) , city (text) , state_province (text) , country_id (text)

departments : department_id (number) , manager_id (number) , department_id (number) | employees : department_id (number) , manager_id (number) , employee_id (number) | job_history : department_id (number) , employee_id (number)


Question: display the employee name ( first name and last name ) and hire date for all employees in the same department as Clara.

regions : region_id (number) , region_name (text) | countries : country_id (text) , country_name (text) , region_id (number) | departments : department_id (number) , department_name (text) , manager_id (number) , location_id (number) | jobs : job_id (text) , job_title (text) , min_salary (number) , max_salary (number) | employees : employee_id (number) , first_name (text) , last_name (text) , email (text) , phone_number (text) , hire_date (time) , job_id (text) , salary (number) , commission_pct (number) , manager_id (number) , department_id (number) | job_history : employee_id (number) , start_date (time) , end_date (time) , job_id (text) , department_id (number) | locations : location_id (number) , street_address (text) , postal_code (text) , city (text) , state_province (text) , country_id (text)

employees : first_name (text) , last_name (text) , hire_date (time) , department_id (number) , employee_id (number) | departments : department_id (number) , department_id (number) | job_history : department_id (number) , employee_id (number)


Question: What are the full names and hire dates for employees in the same department as someone with the first name Clara?

regions : region_id (number) , region_name (text) | countries : country_id (text) , country_name (text) , region_id (number) | departments : department_id (number) , department_name (text) , manager_id (number) , location_id (number) | jobs : job_id (text) , job_title (text) , min_salary (number) , max_salary (number) | employees : employee_id (number) , first_name (text) , last_name (text) , email (text) , phone_number (text) , hire_date (time) , job_id (text) , salary (number) , commission_pct (number) , manager_id (number) , department_id (number) | job_history : employee_id (number) , start_date (time) , end_date (time) , job_id (text) , department_id (number) | locations : location_id (number) , street_address (text) , postal_code (text) , city (text) , state_province (text) , country_id (text)

employees : first_name (text) , last_name (text) , hire_date (time) , department_id (number) , employee_id (number) | departments : department_id (number) , department_id (number) | job_history : department_id (number) , employee_id (number)


Question: display the employee name ( first name and last name ) and hire date for all employees in the same department as Clara excluding Clara.

regions : region_id (number) , region_name (text) | countries : country_id (text) , country_name (text) , region_id (number) | departments : department_id (number) , department_name (text) , manager_id (number) , location_id (number) | jobs : job_id (text) , job_title (text) , min_salary (number) , max_salary (number) | employees : employee_id (number) , first_name (text) , last_name (text) , email (text) , phone_number (text) , hire_date (time) , job_id (text) , salary (number) , commission_pct (number) , manager_id (number) , department_id (number) | job_history : employee_id (number) , start_date (time) , end_date (time) , job_id (text) , department_id (number) | locations : location_id (number) , street_address (text) , postal_code (text) , city (text) , state_province (text) , country_id (text)

employees : first_name (text) , last_name (text) , hire_date (time) , department_id (number) , employee_id (number) | departments : department_id (number) , department_id (number) | job_history : department_id (number) , employee_id (number)


Question: What are the full names and hire dates for employees in the same department as someone with the first name Clara, not including Clara?

regions : region_id (number) , region_name (text) | countries : country_id (text) , country_name (text) , region_id (number) | departments : department_id (number) , department_name (text) , manager_id (number) , location_id (number) | jobs : job_id (text) , job_title (text) , min_salary (number) , max_salary (number) | employees : employee_id (number) , first_name (text) , last_name (text) , email (text) , phone_number (text) , hire_date (time) , job_id (text) , salary (number) , commission_pct (number) , manager_id (number) , department_id (number) | job_history : employee_id (number) , start_date (time) , end_date (time) , job_id (text) , department_id (number) | locations : location_id (number) , street_address (text) , postal_code (text) , city (text) , state_province (text) , country_id (text)

employees : first_name (text) , last_name (text) , hire_date (time) , department_id (number) , employee_id (number) | departments : department_id (number) , department_id (number) | job_history : department_id (number) , employee_id (number)


Question: display the employee number and name( first name and last name ) for all employees who work in a department with any employee whose name contains a ’T’.

regions : region_id (number) , region_name (text) | countries : country_id (text) , country_name (text) , region_id (number) | departments : department_id (number) , department_name (text) , manager_id (number) , location_id (number) | jobs : job_id (text) , job_title (text) , min_salary (number) , max_salary (number) | employees : employee_id (number) , first_name (text) , last_name (text) , email (text) , phone_number (text) , hire_date (time) , job_id (text) , salary (number) , commission_pct (number) , manager_id (number) , department_id (number) | job_history : employee_id (number) , start_date (time) , end_date (time) , job_id (text) , department_id (number) | locations : location_id (number) , street_address (text) , postal_code (text) , city (text) , state_province (text) , country_id (text)

employees : employee_id (number) , first_name (text) , last_name (text) , department_id (number) , employee_id (number) | job_history : employee_id (number) , department_id (number) , employee_id (number) | departments : department_id (number) , department_id (number)


Question: What are the ids and full names for employees who work in a department that has someone with a first name that contains the letter T?

regions : region_id (number) , region_name (text) | countries : country_id (text) , country_name (text) , region_id (number) | departments : department_id (number) , department_name (text) , manager_id (number) , location_id (number) | jobs : job_id (text) , job_title (text) , min_salary (number) , max_salary (number) | employees : employee_id (number) , first_name (text) , last_name (text) , email (text) , phone_number (text) , hire_date (time) , job_id (text) , salary (number) , commission_pct (number) , manager_id (number) , department_id (number) | job_history : employee_id (number) , start_date (time) , end_date (time) , job_id (text) , department_id (number) | locations : location_id (number) , street_address (text) , postal_code (text) , city (text) , state_province (text) , country_id (text)

employees : employee_id (number) , first_name (text) , last_name (text) , department_id (number) , employee_id (number) | job_history : employee_id (number) , department_id (number) , employee_id (number) | departments : department_id (number) , department_id (number)


Question: display the employee number, name( first name and last name ), and salary for all employees who earn more than the average salary and who work in a department with any employee with a 'J' in their first name.

regions : region_id (number) , region_name (text) | countries : country_id (text) , country_name (text) , region_id (number) | departments : department_id (number) , department_name (text) , manager_id (number) , location_id (number) | jobs : job_id (text) , job_title (text) , min_salary (number) , max_salary (number) | employees : employee_id (number) , first_name (text) , last_name (text) , email (text) , phone_number (text) , hire_date (time) , job_id (text) , salary (number) , commission_pct (number) , manager_id (number) , department_id (number) | job_history : employee_id (number) , start_date (time) , end_date (time) , job_id (text) , department_id (number) | locations : location_id (number) , street_address (text) , postal_code (text) , city (text) , state_province (text) , country_id (text)

employees : employee_id (number) , first_name (text) , last_name (text) , salary (number) , department_id (number) , employee_id (number) | job_history : employee_id (number) , department_id (number) , employee_id (number) | departments : department_id (number) , department_id (number)


Question: What are the ids, full names, and salaries for employees making more than average and who work in a department with employees who have the letter J in their first name?

regions : region_id (number) , region_name (text) | countries : country_id (text) , country_name (text) , region_id (number) | departments : department_id (number) , department_name (text) , manager_id (number) , location_id (number) | jobs : job_id (text) , job_title (text) , min_salary (number) , max_salary (number) | employees : employee_id (number) , first_name (text) , last_name (text) , email (text) , phone_number (text) , hire_date (time) , job_id (text) , salary (number) , commission_pct (number) , manager_id (number) , department_id (number) | job_history : employee_id (number) , start_date (time) , end_date (time) , job_id (text) , department_id (number) | locations : location_id (number) , street_address (text) , postal_code (text) , city (text) , state_province (text) , country_id (text)

employees : employee_id (number) , first_name (text) , last_name (text) , salary (number) , department_id (number) , employee_id (number) | job_history : employee_id (number) , department_id (number) , employee_id (number) | departments : department_id (number) , department_id (number)


Question: display the employee number and job id for all employees whose salary is smaller than any salary of those employees whose job title is MK_MAN.

regions : region_id (number) , region_name (text) | countries : country_id (text) , country_name (text) , region_id (number) | departments : department_id (number) , department_name (text) , manager_id (number) , location_id (number) | jobs : job_id (text) , job_title (text) , min_salary (number) , max_salary (number) | employees : employee_id (number) , first_name (text) , last_name (text) , email (text) , phone_number (text) , hire_date (time) , job_id (text) , salary (number) , commission_pct (number) , manager_id (number) , department_id (number) | job_history : employee_id (number) , start_date (time) , end_date (time) , job_id (text) , department_id (number) | locations : location_id (number) , street_address (text) , postal_code (text) , city (text) , state_province (text) , country_id (text)

employees : employee_id (number) , job_id (text) , salary (number) , employee_id (number) | job_history : employee_id (number) , job_id (text) , employee_id (number) | jobs : job_id (text) , job_id (number)


Question: What are the employee ids and job ids for employees who make less than the lowest earning employee with title MK_MAN?

regions : region_id (number) , region_name (text) | countries : country_id (text) , country_name (text) , region_id (number) | departments : department_id (number) , department_name (text) , manager_id (number) , location_id (number) | jobs : job_id (text) , job_title (text) , min_salary (number) , max_salary (number) | employees : employee_id (number) , first_name (text) , last_name (text) , email (text) , phone_number (text) , hire_date (time) , job_id (text) , salary (number) , commission_pct (number) , manager_id (number) , department_id (number) | job_history : employee_id (number) , start_date (time) , end_date (time) , job_id (text) , department_id (number) | locations : location_id (number) , street_address (text) , postal_code (text) , city (text) , state_province (text) , country_id (text)

employees : employee_id (number) , job_id (text) , salary (number) , employee_id (number) | job_history : employee_id (number) , job_id (text) , employee_id (number) | jobs : job_id (text) , job_id (number)


Question: display the employee number, name( first name and last name ) and job title for all employees whose salary is more than any salary of those employees whose job title is PU_MAN.

regions : region_id (number) , region_name (text) | countries : country_id (text) , country_name (text) , region_id (number) | departments : department_id (number) , department_name (text) , manager_id (number) , location_id (number) | jobs : job_id (text) , job_title (text) , min_salary (number) , max_salary (number) | employees : employee_id (number) , first_name (text) , last_name (text) , email (text) , phone_number (text) , hire_date (time) , job_id (text) , salary (number) , commission_pct (number) , manager_id (number) , department_id (number) | job_history : employee_id (number) , start_date (time) , end_date (time) , job_id (text) , department_id (number) | locations : location_id (number) , street_address (text) , postal_code (text) , city (text) , state_province (text) , country_id (text)

employees : employee_id (number) , first_name (text) , last_name (text) , job_id (text) , salary (number) , employee_id (number) | job_history : employee_id (number) , job_id (text) , employee_id (number) | jobs : job_id (text) , job_id (number)


Question: What are the employee ids, full names, and job ids for employees who make more than the highest earning employee with title PU_MAN?

regions : region_id (number) , region_name (text) | countries : country_id (text) , country_name (text) , region_id (number) | departments : department_id (number) , department_name (text) , manager_id (number) , location_id (number) | jobs : job_id (text) , job_title (text) , min_salary (number) , max_salary (number) | employees : employee_id (number) , first_name (text) , last_name (text) , email (text) , phone_number (text) , hire_date (time) , job_id (text) , salary (number) , commission_pct (number) , manager_id (number) , department_id (number) | job_history : employee_id (number) , start_date (time) , end_date (time) , job_id (text) , department_id (number) | locations : location_id (number) , street_address (text) , postal_code (text) , city (text) , state_province (text) , country_id (text)

employees : employee_id (number) , first_name (text) , last_name (text) , job_id (text) , salary (number) , employee_id (number) | job_history : employee_id (number) , job_id (text) , employee_id (number) | jobs : job_id (text) , job_id (number)


Question: display the department id and the total salary for those departments which contains at least two employees.

regions : region_id (number) , region_name (text) | countries : country_id (text) , country_name (text) , region_id (number) | departments : department_id (number) , department_name (text) , manager_id (number) , location_id (number) | jobs : job_id (text) , job_title (text) , min_salary (number) , max_salary (number) | employees : employee_id (number) , first_name (text) , last_name (text) , email (text) , phone_number (text) , hire_date (time) , job_id (text) , salary (number) , commission_pct (number) , manager_id (number) , department_id (number) | job_history : employee_id (number) , start_date (time) , end_date (time) , job_id (text) , department_id (number) | locations : location_id (number) , street_address (text) , postal_code (text) , city (text) , state_province (text) , country_id (text)

departments : department_id (number) , department_id (number) | employees : department_id (number) , salary (number) , employee_id (number) | job_history : department_id (number) , employee_id (number)


Question: What are total salaries and department id for each department that has more than 2 employees?

regions : region_id (number) , region_name (text) | countries : country_id (text) , country_name (text) , region_id (number) | departments : department_id (number) , department_name (text) , manager_id (number) , location_id (number) | jobs : job_id (text) , job_title (text) , min_salary (number) , max_salary (number) | employees : employee_id (number) , first_name (text) , last_name (text) , email (text) , phone_number (text) , hire_date (time) , job_id (text) , salary (number) , commission_pct (number) , manager_id (number) , department_id (number) | job_history : employee_id (number) , start_date (time) , end_date (time) , job_id (text) , department_id (number) | locations : location_id (number) , street_address (text) , postal_code (text) , city (text) , state_province (text) , country_id (text)

departments : department_id (number) , department_id (number) | employees : department_id (number) , salary (number) , employee_id (number) | job_history : department_id (number) , employee_id (number)


Question: display all the information of those employees who did not have any job in the past.

regions : region_id (number) , region_name (text) | countries : country_id (text) , country_name (text) , region_id (number) | departments : department_id (number) , department_name (text) , manager_id (number) , location_id (number) | jobs : job_id (text) , job_title (text) , min_salary (number) , max_salary (number) | employees : employee_id (number) , first_name (text) , last_name (text) , email (text) , phone_number (text) , hire_date (time) , job_id (text) , salary (number) , commission_pct (number) , manager_id (number) , department_id (number) | job_history : employee_id (number) , start_date (time) , end_date (time) , job_id (text) , department_id (number) | locations : location_id (number) , street_address (text) , postal_code (text) , city (text) , state_province (text) , country_id (text)

employees : employee_id (number) , employee_id (number) | job_history : employee_id (number) , employee_id (number)


Question: What is all the information about employees who have never had a job in the past?

regions : region_id (number) , region_name (text) | countries : country_id (text) , country_name (text) , region_id (number) | departments : department_id (number) , department_name (text) , manager_id (number) , location_id (number) | jobs : job_id (text) , job_title (text) , min_salary (number) , max_salary (number) | employees : employee_id (number) , first_name (text) , last_name (text) , email (text) , phone_number (text) , hire_date (time) , job_id (text) , salary (number) , commission_pct (number) , manager_id (number) , department_id (number) | job_history : employee_id (number) , start_date (time) , end_date (time) , job_id (text) , department_id (number) | locations : location_id (number) , street_address (text) , postal_code (text) , city (text) , state_province (text) , country_id (text)

employees : employee_id (number) , employee_id (number) | job_history : employee_id (number) , employee_id (number)


Question: display the department ID, full name (first and last name), salary for those employees who is highest salary in every department.

regions : region_id (number) , region_name (text) | countries : country_id (text) , country_name (text) , region_id (number) | departments : department_id (number) , department_name (text) , manager_id (number) , location_id (number) | jobs : job_id (text) , job_title (text) , min_salary (number) , max_salary (number) | employees : employee_id (number) , first_name (text) , last_name (text) , email (text) , phone_number (text) , hire_date (time) , job_id (text) , salary (number) , commission_pct (number) , manager_id (number) , department_id (number) | job_history : employee_id (number) , start_date (time) , end_date (time) , job_id (text) , department_id (number) | locations : location_id (number) , street_address (text) , postal_code (text) , city (text) , state_province (text) , country_id (text)

employees : first_name (text) , last_name (text) , salary (number) , department_id (number) , employee_id (number) | departments : department_id (number) , department_id (number) | job_history : department_id (number) , employee_id (number)


Question: What are the department ids, full names, and salaries for employees who make the most in their departments?

regions : region_id (number) , region_name (text) | countries : country_id (text) , country_name (text) , region_id (number) | departments : department_id (number) , department_name (text) , manager_id (number) , location_id (number) | jobs : job_id (text) , job_title (text) , min_salary (number) , max_salary (number) | employees : employee_id (number) , first_name (text) , last_name (text) , email (text) , phone_number (text) , hire_date (time) , job_id (text) , salary (number) , commission_pct (number) , manager_id (number) , department_id (number) | job_history : employee_id (number) , start_date (time) , end_date (time) , job_id (text) , department_id (number) | locations : location_id (number) , street_address (text) , postal_code (text) , city (text) , state_province (text) , country_id (text)

employees : first_name (text) , last_name (text) , salary (number) , department_id (number) , employee_id (number) | departments : department_id (number) , department_id (number) | job_history : department_id (number) , employee_id (number)


Question: display the first and last name, department, city, and state province for each employee.

regions : region_id (number) , region_name (text) | countries : country_id (text) , country_name (text) , region_id (number) | departments : department_id (number) , department_name (text) , manager_id (number) , location_id (number) | jobs : job_id (text) , job_title (text) , min_salary (number) , max_salary (number) | employees : employee_id (number) , first_name (text) , last_name (text) , email (text) , phone_number (text) , hire_date (time) , job_id (text) , salary (number) , commission_pct (number) , manager_id (number) , department_id (number) | job_history : employee_id (number) , start_date (time) , end_date (time) , job_id (text) , department_id (number) | locations : location_id (number) , street_address (text) , postal_code (text) , city (text) , state_province (text) , country_id (text)

employees : first_name (text) , last_name (text) , department_id (number) , employee_id (number) | departments : department_name (text) , department_id (number) , location_id (number) , department_id (number) | locations : city (text) , state_province (text) , location_id (number) , location_id (number) | job_history : department_id (number) , employee_id (number)


Question: What are the full names, departments, cities, and state provinces for each employee?

regions : region_id (number) , region_name (text) | countries : country_id (text) , country_name (text) , region_id (number) | departments : department_id (number) , department_name (text) , manager_id (number) , location_id (number) | jobs : job_id (text) , job_title (text) , min_salary (number) , max_salary (number) | employees : employee_id (number) , first_name (text) , last_name (text) , email (text) , phone_number (text) , hire_date (time) , job_id (text) , salary (number) , commission_pct (number) , manager_id (number) , department_id (number) | job_history : employee_id (number) , start_date (time) , end_date (time) , job_id (text) , department_id (number) | locations : location_id (number) , street_address (text) , postal_code (text) , city (text) , state_province (text) , country_id (text)

employees : first_name (text) , last_name (text) , department_id (number) , employee_id (number) | departments : department_name (text) , department_id (number) , location_id (number) , department_id (number) | locations : city (text) , state_province (text) , location_id (number) , location_id (number) | job_history : department_id (number) , employee_id (number)


Question: display those employees who contain a letter z to their first name and also display their last name, city.

regions : region_id (number) , region_name (text) | countries : country_id (text) , country_name (text) , region_id (number) | departments : department_id (number) , department_name (text) , manager_id (number) , location_id (number) | jobs : job_id (text) , job_title (text) , min_salary (number) , max_salary (number) | employees : employee_id (number) , first_name (text) , last_name (text) , email (text) , phone_number (text) , hire_date (time) , job_id (text) , salary (number) , commission_pct (number) , manager_id (number) , department_id (number) | job_history : employee_id (number) , start_date (time) , end_date (time) , job_id (text) , department_id (number) | locations : location_id (number) , street_address (text) , postal_code (text) , city (text) , state_province (text) , country_id (text)

employees : first_name (text) , last_name (text) , department_id (number) , employee_id (number) | locations : city (text) , location_id (number) , location_id (number) | departments : department_id (number) , location_id (number) , department_id (number) | job_history : department_id (number) , employee_id (number)


Question: What are the full names and cities of employees who have the letter Z in their first names?

regions : region_id (number) , region_name (text) | countries : country_id (text) , country_name (text) , region_id (number) | departments : department_id (number) , department_name (text) , manager_id (number) , location_id (number) | jobs : job_id (text) , job_title (text) , min_salary (number) , max_salary (number) | employees : employee_id (number) , first_name (text) , last_name (text) , email (text) , phone_number (text) , hire_date (time) , job_id (text) , salary (number) , commission_pct (number) , manager_id (number) , department_id (number) | job_history : employee_id (number) , start_date (time) , end_date (time) , job_id (text) , department_id (number) | locations : location_id (number) , street_address (text) , postal_code (text) , city (text) , state_province (text) , country_id (text)

employees : first_name (text) , last_name (text) , department_id (number) , employee_id (number) | locations : city (text) , location_id (number) , location_id (number) | departments : department_id (number) , location_id (number) , department_id (number) | job_history : department_id (number) , employee_id (number)


Question: display the department name, city, and state province for each department.

regions : region_id (number) , region_name (text) | countries : country_id (text) , country_name (text) , region_id (number) | departments : department_id (number) , department_name (text) , manager_id (number) , location_id (number) | jobs : job_id (text) , job_title (text) , min_salary (number) , max_salary (number) | employees : employee_id (number) , first_name (text) , last_name (text) , email (text) , phone_number (text) , hire_date (time) , job_id (text) , salary (number) , commission_pct (number) , manager_id (number) , department_id (number) | job_history : employee_id (number) , start_date (time) , end_date (time) , job_id (text) , department_id (number) | locations : location_id (number) , street_address (text) , postal_code (text) , city (text) , state_province (text) , country_id (text)

departments : department_name (text) , location_id (number) , department_id (number) | locations : city (text) , state_province (text) , location_id (number) , location_id (number)


Question: What are the department names, cities, and state provinces for each department?

regions : region_id (number) , region_name (text) | countries : country_id (text) , country_name (text) , region_id (number) | departments : department_id (number) , department_name (text) , manager_id (number) , location_id (number) | jobs : job_id (text) , job_title (text) , min_salary (number) , max_salary (number) | employees : employee_id (number) , first_name (text) , last_name (text) , email (text) , phone_number (text) , hire_date (time) , job_id (text) , salary (number) , commission_pct (number) , manager_id (number) , department_id (number) | job_history : employee_id (number) , start_date (time) , end_date (time) , job_id (text) , department_id (number) | locations : location_id (number) , street_address (text) , postal_code (text) , city (text) , state_province (text) , country_id (text)

departments : department_name (text) , location_id (number) , department_id (number) | locations : city (text) , state_province (text) , location_id (number) , location_id (number)


Question: display the full name (first and last name ) of employee with ID and name of the country presently where (s)he is working.

regions : region_id (number) , region_name (text) | countries : country_id (text) , country_name (text) , region_id (number) | departments : department_id (number) , department_name (text) , manager_id (number) , location_id (number) | jobs : job_id (text) , job_title (text) , min_salary (number) , max_salary (number) | employees : employee_id (number) , first_name (text) , last_name (text) , email (text) , phone_number (text) , hire_date (time) , job_id (text) , salary (number) , commission_pct (number) , manager_id (number) , department_id (number) | job_history : employee_id (number) , start_date (time) , end_date (time) , job_id (text) , department_id (number) | locations : location_id (number) , street_address (text) , postal_code (text) , city (text) , state_province (text) , country_id (text)

employees : first_name (text) , last_name (text) , employee_id (number) , department_id (number) , employee_id (number) | job_history : employee_id (number) , department_id (number) , employee_id (number) | countries : country_name (text) , country_id (text) , country_id (number) | departments : department_id (number) , location_id (number) , department_id (number) | locations : location_id (number) , country_id (text) , location_id (number)


Question: What the full names, ids of each employee and the name of the country they are in?

regions : region_id (number) , region_name (text) | countries : country_id (text) , country_name (text) , region_id (number) | departments : department_id (number) , department_name (text) , manager_id (number) , location_id (number) | jobs : job_id (text) , job_title (text) , min_salary (number) , max_salary (number) | employees : employee_id (number) , first_name (text) , last_name (text) , email (text) , phone_number (text) , hire_date (time) , job_id (text) , salary (number) , commission_pct (number) , manager_id (number) , department_id (number) | job_history : employee_id (number) , start_date (time) , end_date (time) , job_id (text) , department_id (number) | locations : location_id (number) , street_address (text) , postal_code (text) , city (text) , state_province (text) , country_id (text)

employees : first_name (text) , last_name (text) , employee_id (number) , department_id (number) , employee_id (number) | job_history : employee_id (number) , department_id (number) , employee_id (number) | countries : country_name (text) , country_id (text) , country_id (number) | departments : department_id (number) , location_id (number) , department_id (number) | locations : location_id (number) , country_id (text) , location_id (number)


Question: display the department name and number of employees in each of the department.

regions : region_id (number) , region_name (text) | countries : country_id (text) , country_name (text) , region_id (number) | departments : department_id (number) , department_name (text) , manager_id (number) , location_id (number) | jobs : job_id (text) , job_title (text) , min_salary (number) , max_salary (number) | employees : employee_id (number) , first_name (text) , last_name (text) , email (text) , phone_number (text) , hire_date (time) , job_id (text) , salary (number) , commission_pct (number) , manager_id (number) , department_id (number) | job_history : employee_id (number) , start_date (time) , end_date (time) , job_id (text) , department_id (number) | locations : location_id (number) , street_address (text) , postal_code (text) , city (text) , state_province (text) , country_id (text)

departments : department_name (text) , department_id (number) , department_id (number) | employees : department_id (number) , employee_id (number) | job_history : department_id (number) , employee_id (number)


Question: What are the department names and how many employees work in each of them?

regions : region_id (number) , region_name (text) | countries : country_id (text) , country_name (text) , region_id (number) | departments : department_id (number) , department_name (text) , manager_id (number) , location_id (number) | jobs : job_id (text) , job_title (text) , min_salary (number) , max_salary (number) | employees : employee_id (number) , first_name (text) , last_name (text) , email (text) , phone_number (text) , hire_date (time) , job_id (text) , salary (number) , commission_pct (number) , manager_id (number) , department_id (number) | job_history : employee_id (number) , start_date (time) , end_date (time) , job_id (text) , department_id (number) | locations : location_id (number) , street_address (text) , postal_code (text) , city (text) , state_province (text) , country_id (text)

departments : department_name (text) , department_id (number) , department_id (number) | employees : department_id (number) , employee_id (number) | job_history : department_id (number) , employee_id (number)


Question: display the full name (first and last name), and salary of those employees who working in any department located in London.

regions : region_id (number) , region_name (text) | countries : country_id (text) , country_name (text) , region_id (number) | departments : department_id (number) , department_name (text) , manager_id (number) , location_id (number) | jobs : job_id (text) , job_title (text) , min_salary (number) , max_salary (number) | employees : employee_id (number) , first_name (text) , last_name (text) , email (text) , phone_number (text) , hire_date (time) , job_id (text) , salary (number) , commission_pct (number) , manager_id (number) , department_id (number) | job_history : employee_id (number) , start_date (time) , end_date (time) , job_id (text) , department_id (number) | locations : location_id (number) , street_address (text) , postal_code (text) , city (text) , state_province (text) , country_id (text)

employees : first_name (text) , last_name (text) , salary (number) , department_id (number) , employee_id (number) | departments : department_id (number) , location_id (number) , department_id (number) | job_history : department_id (number) , employee_id (number) | locations : location_id (number) , city (text) , location_id (number)


Question: What are full names and salaries of employees working in the city of London?

regions : region_id (number) , region_name (text) | countries : country_id (text) , country_name (text) , region_id (number) | departments : department_id (number) , department_name (text) , manager_id (number) , location_id (number) | jobs : job_id (text) , job_title (text) , min_salary (number) , max_salary (number) | employees : employee_id (number) , first_name (text) , last_name (text) , email (text) , phone_number (text) , hire_date (time) , job_id (text) , salary (number) , commission_pct (number) , manager_id (number) , department_id (number) | job_history : employee_id (number) , start_date (time) , end_date (time) , job_id (text) , department_id (number) | locations : location_id (number) , street_address (text) , postal_code (text) , city (text) , state_province (text) , country_id (text)

employees : first_name (text) , last_name (text) , salary (number) , department_id (number) , employee_id (number) | departments : department_id (number) , location_id (number) , department_id (number) | job_history : department_id (number) , employee_id (number) | locations : location_id (number) , city (text) , location_id (number)


Question: What is the name of the song that was released in the most recent year?

genre : g_name (text) , rating (text) , most_popular_in (text) | artist : artist_name (text) , country (text) , gender (text) , preferred_genre (text) | files : f_id (number) , artist_name (text) , file_size (text) , duration (text) , formats (text) | song : song_name (text) , artist_name (text) , country (text) , f_id (number) , genre_is (text) , rating (number) , languages (text) , releasedate (time) , resolution (number)

song : song_name (text) , releasedate (time) , song_name (number)


Question: What is the name of the song that was released most recently?

genre : g_name (text) , rating (text) , most_popular_in (text) | artist : artist_name (text) , country (text) , gender (text) , preferred_genre (text) | files : f_id (number) , artist_name (text) , file_size (text) , duration (text) , formats (text) | song : song_name (text) , artist_name (text) , country (text) , f_id (number) , genre_is (text) , rating (number) , languages (text) , releasedate (time) , resolution (number)

song : song_name (text) , releasedate (time) , song_name (number)


Question: What is the id of the longest song?

genre : g_name (text) , rating (text) , most_popular_in (text) | artist : artist_name (text) , country (text) , gender (text) , preferred_genre (text) | files : f_id (number) , artist_name (text) , file_size (text) , duration (text) , formats (text) | song : song_name (text) , artist_name (text) , country (text) , f_id (number) , genre_is (text) , rating (number) , languages (text) , releasedate (time) , resolution (number)

files : f_id (number) , duration (text) , f_id (number) | song : f_id (number) , song_name (number)