Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started