JOINS - Cartesian Product

Cartesian product using SELF JOINs and filters

Let’s say we want to select a panel of 2 authors, author1 and author2, out of all available authors. There’s one condition though, author1 must be a female (gender ‘F’) and author2 must be a male (gender ‘M’). Write a query to get all combinations of names of author1 and author2.

Set the headers for names of author1 and author2, as author1 and author2, respectively.