Write a query to find pairs of products that are frequently purchased together in the same SalesOrder. Retrieve pairs that have been sold more than 5 times. Output the results with columns ProductName1, ProductName2, and PairsCount, ordered by PairsCount in descending order, and then by ProductName1 and ProductName2 in ascending order.
Write your request in the field below and click the "Check it!" button.
Use SQL Server 2022 syntax to write your answer. Descriptions of tables are provided at the bottom of the screen.
AdventureWorks DB ER diagram