https://mariadb.com/kb/en/joining-tables-with-join-clauses/
https://mariadb.com/kb/en/join-syntax/
2 SETS, A and B (two tables)
# All from A, and matching from B (null if not matching) - Left outer join
SELECT *
FROM tableA as A
LEFT OUTER JOIN tableB as B
ON A.myID = B.myID;
# All from B, and matching from A (null if not matching) - Right outer join (can do Left JOIN moving the syntax)
SELECT *
FROM tableA as A
RIGHT OUTER JOIN tableB as B
ON A.myID = B.myID;
The Union operator combines the results of two or more queries into a distinct single result set
https://mariadb.com/kb/en/union/
https://www.sqlshack.com/sql-union-overview-usage-and-examples/