Joins, Subqueries, and Set
Explore joins, subqueries, and set operations in MariaDB SQL. This section details how to combine data from multiple tables, nest queries, and perform set-based operations for complex data retrieval.
Multiple Joins
SELECT Books.title, Authors.name, Publishers.name
FROM Books
INNER JOIN Authors ON Books.author_id = Authors.id
INNER JOIN Publishers ON Books.publisher_id = Publishers.id;Subqueries
SELECT title, price
FROM Books
WHERE price > (SELECT AVG(price) FROM Books);Set Operations
Conclusion
See Also
Last updated
Was this helpful?

