Question: User A company stores data about its employees in two tables, employees and positions, with the following structure: create table employees ( id integer not
User A company stores data about its employees in two tables, employees and positions, with the following structure: create table employees id integer not null unique, name varchar not null, age integer not null, salary integer not null create table positions id integer not null unique, departmentname varchar not null, employeeid integer not null unique, positionname varchar not null ; Each record in the table employees represents a single employee and consists of the following data: id name, age and salary. Each record in the table positions represents the position description of a single employee and consists of the following data: id departmentname, employeeid and positionname. Note: employeeid represents id of employees from previously mentioned employees table. Write an SQL query that calculates the average salary of all employees who are working in a Software Engineer position and are at most years old. If there are no such employees then the answer should be NULL
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
