Question: List the names of clubs that do not have any players.

club : club_id (number) , name (text) , region (text) , start_year (text) | club_rank : rank (number) , club_id (number) , gold (number) , silver (number) , bronze (number) , total (number) | player : player_id (number) , name (text) , position (text) , club_id (number) , apps (number) , tries (number) , goals (text) , points (number) | competition : competition_id (number) , year (number) , competition_type (text) , country (text) | competition_result : competition_id (number) , club_id_1 (number) , club_id_2 (number) , score (text)

club : name (text) , club_id (number) | player : name (text) , club_id (number) , player_id (number)


Question: What are the names of all clubs that do not have any players?

club : club_id (number) , name (text) , region (text) , start_year (text) | club_rank : rank (number) , club_id (number) , gold (number) , silver (number) , bronze (number) , total (number) | player : player_id (number) , name (text) , position (text) , club_id (number) , apps (number) , tries (number) , goals (text) , points (number) | competition : competition_id (number) , year (number) , competition_type (text) , country (text) | competition_result : competition_id (number) , club_id_1 (number) , club_id_2 (number) , score (text)

club : name (text) , club_id (number) | player : name (text) , club_id (number) , player_id (number)


Question: What are the positions with both players having more than 20 points and less than 10 points.

club : club_id (number) , name (text) , region (text) , start_year (text) | club_rank : rank (number) , club_id (number) , gold (number) , silver (number) , bronze (number) , total (number) | player : player_id (number) , name (text) , position (text) , club_id (number) , apps (number) , tries (number) , goals (text) , points (number) | competition : competition_id (number) , year (number) , competition_type (text) , country (text) | competition_result : competition_id (number) , club_id_1 (number) , club_id_2 (number) , score (text)

player : position (text) , points (number) , player_id (number)


Question: What are the positions of both players that have more than 20 20 points and less than 10 points?

club : club_id (number) , name (text) , region (text) , start_year (text) | club_rank : rank (number) , club_id (number) , gold (number) , silver (number) , bronze (number) , total (number) | player : player_id (number) , name (text) , position (text) , club_id (number) , apps (number) , tries (number) , goals (text) , points (number) | competition : competition_id (number) , year (number) , competition_type (text) , country (text) | competition_result : competition_id (number) , club_id_1 (number) , club_id_2 (number) , score (text)

player : position (text) , points (number) , player_id (number)


Question: Show total points of all players.

club : club_id (number) , name (text) , region (text) , start_year (text) | club_rank : rank (number) , club_id (number) , gold (number) , silver (number) , bronze (number) , total (number) | player : player_id (number) , name (text) , position (text) , club_id (number) , apps (number) , tries (number) , goals (text) , points (number) | competition : competition_id (number) , year (number) , competition_type (text) , country (text) | competition_result : competition_id (number) , club_id_1 (number) , club_id_2 (number) , score (text)

player : points (number) , player_id (number)


Question: What is the total number of points for all players?

club : club_id (number) , name (text) , region (text) , start_year (text) | club_rank : rank (number) , club_id (number) , gold (number) , silver (number) , bronze (number) , total (number) | player : player_id (number) , name (text) , position (text) , club_id (number) , apps (number) , tries (number) , goals (text) , points (number) | competition : competition_id (number) , year (number) , competition_type (text) , country (text) | competition_result : competition_id (number) , club_id_1 (number) , club_id_2 (number) , score (text)

player : points (number) , player_id (number)


Question: how many different positions are there?

club : club_id (number) , name (text) , region (text) , start_year (text) | club_rank : rank (number) , club_id (number) , gold (number) , silver (number) , bronze (number) , total (number) | player : player_id (number) , name (text) , position (text) , club_id (number) , apps (number) , tries (number) , goals (text) , points (number) | competition : competition_id (number) , year (number) , competition_type (text) , country (text) | competition_result : competition_id (number) , club_id_1 (number) , club_id_2 (number) , score (text)

player : position (text) , player_id (number)


Question: How many different position for players are listed?

club : club_id (number) , name (text) , region (text) , start_year (text) | club_rank : rank (number) , club_id (number) , gold (number) , silver (number) , bronze (number) , total (number) | player : player_id (number) , name (text) , position (text) , club_id (number) , apps (number) , tries (number) , goals (text) , points (number) | competition : competition_id (number) , year (number) , competition_type (text) , country (text) | competition_result : competition_id (number) , club_id_1 (number) , club_id_2 (number) , score (text)

player : position (text) , player_id (number)


Question: what are the name of players who get more than the average points.

club : club_id (number) , name (text) , region (text) , start_year (text) | club_rank : rank (number) , club_id (number) , gold (number) , silver (number) , bronze (number) , total (number) | player : player_id (number) , name (text) , position (text) , club_id (number) , apps (number) , tries (number) , goals (text) , points (number) | competition : competition_id (number) , year (number) , competition_type (text) , country (text) | competition_result : competition_id (number) , club_id_1 (number) , club_id_2 (number) , score (text)

player : name (text) , points (number) , player_id (number)


Question: What are the names of all players that got more than the average number of points?

club : club_id (number) , name (text) , region (text) , start_year (text) | club_rank : rank (number) , club_id (number) , gold (number) , silver (number) , bronze (number) , total (number) | player : player_id (number) , name (text) , position (text) , club_id (number) , apps (number) , tries (number) , goals (text) , points (number) | competition : competition_id (number) , year (number) , competition_type (text) , country (text) | competition_result : competition_id (number) , club_id_1 (number) , club_id_2 (number) , score (text)

player : name (text) , points (number) , player_id (number)


Question: find the number of players whose points are lower than 30 in each position.

club : club_id (number) , name (text) , region (text) , start_year (text) | club_rank : rank (number) , club_id (number) , gold (number) , silver (number) , bronze (number) , total (number) | player : player_id (number) , name (text) , position (text) , club_id (number) , apps (number) , tries (number) , goals (text) , points (number) | competition : competition_id (number) , year (number) , competition_type (text) , country (text) | competition_result : competition_id (number) , club_id_1 (number) , club_id_2 (number) , score (text)

player : position (text) , points (number) , player_id (number)


Question: What is the number of players who have points less than 30 for each position?

club : club_id (number) , name (text) , region (text) , start_year (text) | club_rank : rank (number) , club_id (number) , gold (number) , silver (number) , bronze (number) , total (number) | player : player_id (number) , name (text) , position (text) , club_id (number) , apps (number) , tries (number) , goals (text) , points (number) | competition : competition_id (number) , year (number) , competition_type (text) , country (text) | competition_result : competition_id (number) , club_id_1 (number) , club_id_2 (number) , score (text)

player : position (text) , points (number) , player_id (number)


Question: which country did participated in the most number of Tournament competitions?

club : club_id (number) , name (text) , region (text) , start_year (text) | club_rank : rank (number) , club_id (number) , gold (number) , silver (number) , bronze (number) , total (number) | player : player_id (number) , name (text) , position (text) , club_id (number) , apps (number) , tries (number) , goals (text) , points (number) | competition : competition_id (number) , year (number) , competition_type (text) , country (text) | competition_result : competition_id (number) , club_id_1 (number) , club_id_2 (number) , score (text)

competition : country (text) , competition_type (text) , competition_id (number)


Question: what is the name of the country that participated in the most tournament competitions?

club : club_id (number) , name (text) , region (text) , start_year (text) | club_rank : rank (number) , club_id (number) , gold (number) , silver (number) , bronze (number) , total (number) | player : player_id (number) , name (text) , position (text) , club_id (number) , apps (number) , tries (number) , goals (text) , points (number) | competition : competition_id (number) , year (number) , competition_type (text) , country (text) | competition_result : competition_id (number) , club_id_1 (number) , club_id_2 (number) , score (text)

competition : country (text) , competition_type (text) , competition_id (number)


Question: which countries did participated in both Friendly and Tournament type competitions.

club : club_id (number) , name (text) , region (text) , start_year (text) | club_rank : rank (number) , club_id (number) , gold (number) , silver (number) , bronze (number) , total (number) | player : player_id (number) , name (text) , position (text) , club_id (number) , apps (number) , tries (number) , goals (text) , points (number) | competition : competition_id (number) , year (number) , competition_type (text) , country (text) | competition_result : competition_id (number) , club_id_1 (number) , club_id_2 (number) , score (text)

competition : country (text) , competition_type (text) , competition_id (number)


Question: What are the countries that participated in both friendly and tournament type competitions?

club : club_id (number) , name (text) , region (text) , start_year (text) | club_rank : rank (number) , club_id (number) , gold (number) , silver (number) , bronze (number) , total (number) | player : player_id (number) , name (text) , position (text) , club_id (number) , apps (number) , tries (number) , goals (text) , points (number) | competition : competition_id (number) , year (number) , competition_type (text) , country (text) | competition_result : competition_id (number) , club_id_1 (number) , club_id_2 (number) , score (text)

competition : country (text) , competition_type (text) , competition_id (number)


Question: Find the countries that have never participated in any competition with Friendly type.

club : club_id (number) , name (text) , region (text) , start_year (text) | club_rank : rank (number) , club_id (number) , gold (number) , silver (number) , bronze (number) , total (number) | player : player_id (number) , name (text) , position (text) , club_id (number) , apps (number) , tries (number) , goals (text) , points (number) | competition : competition_id (number) , year (number) , competition_type (text) , country (text) | competition_result : competition_id (number) , club_id_1 (number) , club_id_2 (number) , score (text)

competition : country (text) , competition_type (text) , competition_id (number)


Question: What are the countries that have never participated in any friendly-type competitions?

club : club_id (number) , name (text) , region (text) , start_year (text) | club_rank : rank (number) , club_id (number) , gold (number) , silver (number) , bronze (number) , total (number) | player : player_id (number) , name (text) , position (text) , club_id (number) , apps (number) , tries (number) , goals (text) , points (number) | competition : competition_id (number) , year (number) , competition_type (text) , country (text) | competition_result : competition_id (number) , club_id_1 (number) , club_id_2 (number) , score (text)

competition : country (text) , competition_type (text) , competition_id (number)


Question: How many furniture components are there in total?

manufacturer : manufacturer_id (number) , open_year (number) , name (text) , num_of_factories (number) , num_of_shops (number) | furniture : furniture_id (number) , name (text) , num_of_component (number) , market_rate (number) | furniture_manufacte : manufacturer_id (number) , furniture_id (number) , price_in_dollar (number)

furniture : num_of_component (number) , furniture_id (number)


Question: Return the name and id of the furniture with the highest market rate.

manufacturer : manufacturer_id (number) , open_year (number) , name (text) , num_of_factories (number) , num_of_shops (number) | furniture : furniture_id (number) , name (text) , num_of_component (number) , market_rate (number) | furniture_manufacte : manufacturer_id (number) , furniture_id (number) , price_in_dollar (number)

furniture : name (text) , furniture_id (number) , market_rate (number)


Question: find the total market rate of the furnitures that have the top 2 market shares.

manufacturer : manufacturer_id (number) , open_year (number) , name (text) , num_of_factories (number) , num_of_shops (number) | furniture : furniture_id (number) , name (text) , num_of_component (number) , market_rate (number) | furniture_manufacte : manufacturer_id (number) , furniture_id (number) , price_in_dollar (number)

furniture : market_rate (number) , furniture_id (number)


Question: Find the component amounts and names of all furnitures that have more than 10 components.

manufacturer : manufacturer_id (number) , open_year (number) , name (text) , num_of_factories (number) , num_of_shops (number) | furniture : furniture_id (number) , name (text) , num_of_component (number) , market_rate (number) | furniture_manufacte : manufacturer_id (number) , furniture_id (number) , price_in_dollar (number)

furniture : num_of_component (number) , name (text) , furniture_id (number)


Question: Find the name and component amount of the least popular furniture.

manufacturer : manufacturer_id (number) , open_year (number) , name (text) , num_of_factories (number) , num_of_shops (number) | furniture : furniture_id (number) , name (text) , num_of_component (number) , market_rate (number) | furniture_manufacte : manufacturer_id (number) , furniture_id (number) , price_in_dollar (number)

furniture : name (text) , num_of_component (number) , market_rate (number) , furniture_id (number)


Question: Find the names of furnitures whose prices are lower than the highest price.

manufacturer : manufacturer_id (number) , open_year (number) , name (text) , num_of_factories (number) , num_of_shops (number) | furniture : furniture_id (number) , name (text) , num_of_component (number) , market_rate (number) | furniture_manufacte : manufacturer_id (number) , furniture_id (number) , price_in_dollar (number)

furniture : name (text) , furniture_id (number) | furniture_manufacte : furniture_id (number) , price_in_dollar (number) , manufacturer_id (number)


Question: Which manufacturer has the most number of shops? List its name and year of opening.

manufacturer : manufacturer_id (number) , open_year (number) , name (text) , num_of_factories (number) , num_of_shops (number) | furniture : furniture_id (number) , name (text) , num_of_component (number) , market_rate (number) | furniture_manufacte : manufacturer_id (number) , furniture_id (number) , price_in_dollar (number)

manufacturer : open_year (number) , name (text) , num_of_shops (number) , manufacturer_id (number)


Question: Find the average number of factories for the manufacturers that have more than 20 shops.

manufacturer : manufacturer_id (number) , open_year (number) , name (text) , num_of_factories (number) , num_of_shops (number) | furniture : furniture_id (number) , name (text) , num_of_component (number) , market_rate (number) | furniture_manufacte : manufacturer_id (number) , furniture_id (number) , price_in_dollar (number)

manufacturer : num_of_factories (number) , num_of_shops (number) , manufacturer_id (number)


Question: List all manufacturer names and ids ordered by their opening year.

manufacturer : manufacturer_id (number) , open_year (number) , name (text) , num_of_factories (number) , num_of_shops (number) | furniture : furniture_id (number) , name (text) , num_of_component (number) , market_rate (number) | furniture_manufacte : manufacturer_id (number) , furniture_id (number) , price_in_dollar (number)

manufacturer : name (text) , manufacturer_id (number) , open_year (number)


Question: Give me the name and year of opening of the manufacturers that have either less than 10 factories or more than 10 shops.

manufacturer : manufacturer_id (number) , open_year (number) , name (text) , num_of_factories (number) , num_of_shops (number) | furniture : furniture_id (number) , name (text) , num_of_component (number) , market_rate (number) | furniture_manufacte : manufacturer_id (number) , furniture_id (number) , price_in_dollar (number)

manufacturer : name (text) , open_year (number) , num_of_shops (number) , num_of_factories (number) , manufacturer_id (number)


Question: what is the average number of factories and maximum number of shops for manufacturers that opened before 1990.

manufacturer : manufacturer_id (number) , open_year (number) , name (text) , num_of_factories (number) , num_of_shops (number) | furniture : furniture_id (number) , name (text) , num_of_component (number) , market_rate (number) | furniture_manufacte : manufacturer_id (number) , furniture_id (number) , price_in_dollar (number)

manufacturer : num_of_shops (number) , num_of_factories (number) , open_year (number) , manufacturer_id (number)


Question: Find the id and number of shops for the company that produces the most expensive furniture.

manufacturer : manufacturer_id (number) , open_year (number) , name (text) , num_of_factories (number) , num_of_shops (number) | furniture : furniture_id (number) , name (text) , num_of_component (number) , market_rate (number) | furniture_manufacte : manufacturer_id (number) , furniture_id (number) , price_in_dollar (number)

manufacturer : manufacturer_id (number) , num_of_shops (number) | furniture_manufacte : manufacturer_id (number) , price_in_dollar (number)


Question: Find the number of funiture types produced by each manufacturer as well as the company names.

manufacturer : manufacturer_id (number) , open_year (number) , name (text) , num_of_factories (number) , num_of_shops (number) | furniture : furniture_id (number) , name (text) , num_of_component (number) , market_rate (number) | furniture_manufacte : manufacturer_id (number) , furniture_id (number) , price_in_dollar (number)

manufacturer : name (text) , manufacturer_id (number) | furniture_manufacte : manufacturer_id (number)


Question: Give me the names and prices of furnitures which some companies are manufacturing.

manufacturer : manufacturer_id (number) , open_year (number) , name (text) , num_of_factories (number) , num_of_shops (number) | furniture : furniture_id (number) , name (text) , num_of_component (number) , market_rate (number) | furniture_manufacte : manufacturer_id (number) , furniture_id (number) , price_in_dollar (number)

furniture : name (text) , furniture_id (number) | furniture_manufacte : price_in_dollar (number) , furniture_id (number) , manufacturer_id (number)


Question: Find the market shares and names of furnitures which no any company is producing in our records.

manufacturer : manufacturer_id (number) , open_year (number) , name (text) , num_of_factories (number) , num_of_shops (number) | furniture : furniture_id (number) , name (text) , num_of_component (number) , market_rate (number) | furniture_manufacte : manufacturer_id (number) , furniture_id (number) , price_in_dollar (number)

furniture : market_rate (number) , name (text) , furniture_id (number) | furniture_manufacte : furniture_id (number) , manufacturer_id (number)


Question: Find the name of the company that produces both furnitures with less than 6 components and furnitures with more than 10 components.

manufacturer : manufacturer_id (number) , open_year (number) , name (text) , num_of_factories (number) , num_of_shops (number) | furniture : furniture_id (number) , name (text) , num_of_component (number) , market_rate (number) | furniture_manufacte : manufacturer_id (number) , furniture_id (number) , price_in_dollar (number)

manufacturer : name (text) , manufacturer_id (number) | furniture : name (text) , furniture_id (number) , num_of_component (number) | furniture_manufacte : furniture_id (number) , manufacturer_id (number)


Question: Display the first name and department name 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) , department_id (number) , employee_id (number) | departments : department_name (text) , department_id (number)


Question: What are the first name and department name of all 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)

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


Question: List the full name (first and last name), and salary for those employees who earn below 6000.

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)


Question: What are the full names and salaries for any employees earning less than 6000?

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)


Question: Display the first name, and department number for all employees whose last name is "McEwen".

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) , department_id (number) , last_name (text) , employee_id (number)


Question: What are the first names and department numbers for employees with last name McEwen?

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) , department_id (number) , last_name (text) , employee_id (number)


Question: Return all the information for all employees without any department number.

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 : department_id (number) , employee_id (number)


Question: What are all the employees without a department number?

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 : department_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: when is the hire date for those employees whose first name does not containing the letter M?

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 : hire_date (time) , first_name (text) , employee_id (number)


Question: On what dates were employees without the letter M in their first names hired?

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 : hire_date (time) , first_name (text) , employee_id (number)


Question: display the full name (first and last), hire date, salary, and department number for those employees whose first name does not containing the letter M.

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) , salary (number) , department_id (number) , employee_id (number)


Question: What are the full name, hire date, salary, and department id for employees without the letter M 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 : first_name (text) , last_name (text) , hire_date (time) , salary (number) , department_id (number) , employee_id (number)


Question: display the full name (first and last), hire date, salary, and department number for those employees whose first name does not containing the letter M and make the result set in ascending order by department number.

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) , salary (number) , department_id (number) , employee_id (number)


Question: What are the full name, hire data, salary and department id for employees without the letter M in their first name, ordered by ascending department id?

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) , salary (number) , department_id (number) , employee_id (number)


Question: what is the phone number of employees whose salary is in the range of 8000 and 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 : phone_number (text) , salary (number) , employee_id (number)


Question: Return the phone numbers of employees with salaries between 8000 and 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 : phone_number (text) , salary (number) , employee_id (number)


Question: display all the information of employees whose salary is in the range of 8000 and 12000 and commission is not null or department number does not equal to 40.

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) , commission_pct (number) , department_id (number) , employee_id (number)


Question: Return all information about employees with salaries between 8000 and 12000 for which commission is not null or where their department id is not 40.

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) , commission_pct (number) , department_id (number) , employee_id (number)


Question: What are the full name (first and last name) and salary for all employees who does not have any value for 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)

employees : first_name (text) , last_name (text) , salary (number) , commission_pct (number) , employee_id (number)


Question: Return the full names and salaries of employees with null commissions.

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) , commission_pct (number) , employee_id (number)


Question: Display the first and last name, and salary for those employees whose first name is ending with the letter m.

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)


Question: Return the full names and salaries for employees with first names that end with the letter m.

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)


Question: Find job id and date of hire for those employees who was hired between November 5th, 2007 and July 5th, 2009.

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 : job_id (text) , hire_date (time) , employee_id (number)


Question: What are the job ids and dates of hire for employees hired after November 5th, 2007 and before July 5th, 2009?

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 : job_id (text) , hire_date (time) , employee_id (number)


Question: What are the first and last name for those employees who works either in department 70 or 90?

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)


Question: What are the full names of employees who with in department 70 or 90?

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)


Question: Find the salary and manager number for those employees who is working under a manager.

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) , manager_id (number) , employee_id (number)


Question: What are the salaries and manager ids for employees who have 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)

employees : salary (number) , manager_id (number) , employee_id (number)


Question: display all the details from Employees table for those employees who was hired before 2002-06-21.

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 : hire_date (time) , employee_id (number)


Question: What is all the information about employees hired before June 21, 2002?

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 : hire_date (time) , employee_id (number)


Question: display all the information for all employees who have the letters D or S in their first name and also arrange the result in descending order by 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 : first_name (text) , salary (number) , employee_id (number)


Question: What is all the information about employees with D or S in their first name, ordered by salary descending?

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) , salary (number) , employee_id (number)


Question: display those employees who joined after 7th September, 1987.

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 : hire_date (time) , employee_id (number)


Question: Which employees were hired after September 7th, 1987?

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 : hire_date (time) , employee_id (number)


Question: display the job title of jobs which minimum salary is greater than 9000.

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) , min_salary (number) , job_id (text)


Question: Which job titles correspond to jobs with salaries over 9000?

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) , min_salary (number) , job_id (text)


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 (text)


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 (text)


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)


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)


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)

job_history : employee_id (number) , end_date (time)


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)

job_history : employee_id (number) , end_date (time)


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)

employees : department_id (number) , commission_pct (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)

employees : department_id (number) , commission_pct (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)

employees : department_id (number) , manager_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)

employees : department_id (number) , manager_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)

employees : department_id (number) , salary (number) , commission_pct (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)

employees : department_id (number) , salary (number) , commission_pct (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)

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)

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)

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)

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)


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)


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) | countries : country_name (text) , country_id (text) | departments : department_id (number) , location_id (number) | locations : location_id (number) , country_id (text)


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) | countries : country_name (text) , country_id (text) | departments : department_id (number) , location_id (number) | locations : location_id (number) , country_id (text)


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) | employees : 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) | employees : 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) | job_history : 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) | job_history : 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) | employees : salary (number) , 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) | employees : salary (number) , 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)


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)


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)


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)


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)


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)


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)


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)


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)


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)


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) | employees : 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) | employees : 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) | employees : department_id (number) , employee_id (number) , manager_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) | employees : department_id (number) , employee_id (number) , manager_id (number)