DEV Community

loading...

Discussion on: Advent of Code 2020 Solution Megathread - Day 1: Report Repair

Collapse
clothierdroid profile image
David Clothier

SQL works for me. Easy and fast ;)

Get this table naming 'day1':
table

1.2. Solution

SELECT
       a1.num*a2.num*a3.num
FROM
       day1 a1
     , day1 a2
     , day1 a3
WHERE
       a1.num + a2.num + a3.num = 2020
LIMIT 1
Enter fullscreen mode Exit fullscreen mode