This was a puzzle that was on this website which I solved by SQL
Here is the puzzle repeated again
At a Yankee Swap a few years ago, I was given a wooden puzzle, shown above. It consists of a wooden base and seven discs marked with colored dots. The object, according to a printed insert, is to rearrange the discs so that the colored dots on each disc match those on the neighboring discs. In the arrangement shown above, the top two discs are lined-up correctly because they match green dots. The lower left discs are lined-up because they match white dots.
The puzzle is solved when all of the possible dot pairs match, i.e., each of the outer discs matches its two neighbors and the center disc, and each of the dots on the center disc must line up with a matching dot on each of the outer discs.
The discs are loose– they may be rearranged, repositioned and rotated.
How would you go about solving this puzzle?