Find Circular Gift Exchange Chains
[]
['CREATE TABLE SecretSanta (\n    giver_id INT,\n    receiver_id INT,\n    gift_value INT\n)\n', 'Truncate table SecretSanta', "insert into SecretSanta (giver_id, receiver_id, gift_value) values ('1', '2', '20')", "insert into SecretSanta (giver_id, receiver_id, gift_value) values ('2', '3', '30')", "insert into SecretSanta (giver_id, receiver_id, gift_value) values ('3', '1', '40')", "insert into SecretSanta (giver_id, receiver_id, gift_value) values ('4', '5', '25')", "insert into SecretSanta (giver_id, receiver_id, gift_value) values ('5', '4', '35')"]
{"mysql": ["CREATE TABLE SecretSanta (\n    giver_id INT,\n    receiver_id INT,\n    gift_value INT\n)\n"], "mssql": ["CREATE TABLE SecretSanta (\n    giver_id INT,\n    receiver_id INT,\n    gift_value INT\n)\n"], "oraclesql": ["CREATE TABLE SecretSanta (\n    giver_id NUMBER,\n    receiver_id NUMBER,\n    gift_value NUMBER\n)\n"], "database": true, "name": "find_gift_chains", "pythondata": ["SecretSanta = pd.DataFrame(columns=[\"giver_id\", \"receiver_id\", \"gift_value\"]).astype({\"giver_id\": \"int\", \"receiver_id\": \"int\", \"gift_value\": \"int\"})\n"], "postgresql": ["CREATE TABLE SecretSanta (\n    giver_id INT,\n    receiver_id INT,\n    gift_value INT\n)\n"], "database_schema": {"SecretSanta": {"giver_id": "INT", "receiver_id": "INT", "gift_value": "INT"}}}
{"mysql": ["MySQL", "<p><code>MySQL 8.0</code>.</p>"], "mssql": ["MS SQL Server", "<p><code>mssql server 2019</code>.</p>"], "oraclesql": ["Oracle", "<p><code>Oracle Sql 11.2</code>.</p>"], "pythondata": ["Pandas", "<p>Python 3.10 with Pandas 2.2.2 and NumPy 1.26.4</p>"], "postgresql": ["PostgreSQL", "<p>PostgreSQL 16</p>"]}
['Database']