AltQuery
Initializing SQL database...
Back to Questions

CTE - Common Table Expression #20

hard

Use a CTE to find employees with above-average salaries. Recursive CTEs or complex CTE chains. Recursive CTEs use UNION ALL and can traverse hierarchical data. Be careful to include proper termination conditions.

Practice with:

Database Schema

employees

Employee information

idnamesalary

Expected Output

Click "Show" to see what the correct output should look like.Tip: Try solving it yourself first for better learning!

SQL Editor

Loading...

Start typing for autocomplete

AI Help

Ask for help!