What will be the output of Following SQL Query
Question
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
It will take less than 1 minute to register for lifetime. Bonus Tip - We don't send OTP to your email id Make Sure to use your own email id for free books and giveaways
Answer ( 1 )
After Running the code will return the columns name, last_name, and salary from the table Salary, but only where the salary is greater than the average number of salary from Salary Table.
The inner query executes first.
Therefore it will first compute average of salary among the salaries in the salary table and then select the salaries that are greater than the value of avg(salary).
Then these selected tuples will return to the above query where their name,last_name and salary will be printed for the people whose salaries is greater than avg(salary) which is returned by inner query.
It will return only those salaries which are greater than the average salary .