INSERT INTO tournaments(name, location, start_date, end_date, description)
VALUES ('Super Sunday #1', 'Padel Club', CURRENT_DATE + INTERVAL '7 day', CURRENT_DATE + INTERVAL '7 day', 'Tournoi amical'),
       ('Super Sunday #2', 'Central Court', CURRENT_DATE + INTERVAL '14 day', CURRENT_DATE + INTERVAL '14 day', 'Americano vibes')
ON CONFLICT DO NOTHING;

-- Participants for tournament 1
INSERT INTO participants(tournament_id, name, rating)
SELECT t.id, p.name, p.rating
FROM (VALUES ('Player A', 4.0), ('Player B', 4.2), ('Player C', 3.8), ('Player D', 4.1)) AS p(name, rating),
     (SELECT id FROM tournaments WHERE name='Super Sunday #1' LIMIT 1) t;

