We’ve created an exciting code challenge to get the holiday mental juices flowing. Here’s an interesting problem to solve using SingleStore. Solve this code challenge, post your answer as a public GitHub repo or gist, and submit your answer to receive a special December Code Challenge badge on these forums.
The Problem
- Given these 3 CSVs (1 line per file):
'Customer 1'\t'Account abc'\t'["tag1", "tag3", "tag5"]'
'Customer 2'\t'Account def'\t'["tag2", "tag3", "tag4"]'
'Customer 3'\t'Account chi'\t'["tag3", "tag4", "tag5"]'
-
Injest these files into a table.
-
Craft a SELECT query that yields this:
[
{
"tag": "tag3",
"matches": ["Customer1", "Customer2", "Customer3"]
},
{
"tag": "tag4",
"matches": ["Customer2", "Customer3"]
},
{
"tag": "tag5",
"matches": ["Customer1", "Customer3"]
},
{
"tag": "tag1",
"matches": ["Customer1"]
},
{
"tag": "tag2",
"matches": ["Customer2"]
}
]
How to Win
-
Post your solution as a public GitHub Repo or GitHub Gist.
-
Submit your GitHub URL to SingleStore Code Challenge.
-
All complete entries will receive this month’s special Code Challenge badge in the forum.