Search the courses, subjects, tracks, games and features, or jump straight to a page.
2 cards from this section. Quick, good the night before a test.
What is a subquery?
Think about a query inside a query.
What does a CTE stand for?
It starts with 'C' and is related to organizing results.
What is a subquery?
Remember, it's like asking a question inside another question.
True or false: CTEs only allow for storing data temporarily.
Think about what a temporary table does.
Create an SQL query that uses both a subquery and a CTE to find all employees in departments with total sales above 100,000.
Break this down—start with the CTE to aggregate sales.
Write a complex SQL query using window functions to rank employees by their salaries and show their names along with average salaries in their departments.
Use window functions for both ranking and averaging.
4 more questions in this section. Enroll free to practise them all.
Enroll free