sql - How to create a query to list all combinations possibilities - Stack Overflow

PHOTO EMBED

Mon Apr 08 2024 10:25:57 GMT+0000 (Coordinated Universal Time)

Saved by @flaviobrito #sql

SELECT 
  c1.currency AS [From], c2.currency AS [To] , cer.Exchange_Rate
FROM
  currency c1 JOIN currency c2 ON c1.rec_id <> c2.rec_id
  LEFT OUTER JOIN CurrencyExchangeRate cer ON c1.rec_id = cer.[from] 
         AND c2.rec_id = cer.[to]
content_copyCOPY

https://stackoverflow.com/questions/2258735/how-to-create-a-query-to-list-all-combinations-possibilities