table-cyclist-career-teams
INSERT INTO cycling.cyclist_career_teams (id,lastname,teams) VALUES (e7cd5752-bc0d-4157-a80f-7523add8dbcd, 'VAN DER BREGGEN', { 'Rabobank-Liv Woman Cycling Team','Sengers Ladies Cycling Team','Team Flexpoint' } );
INSERT INTO cycling.cyclist_career_teams (id,lastname,teams) VALUES (cb07baad-eac8-4f65-b28a-bddc06a0de23, 'ARMITSTEAD', { 'Boels-Dolmans Cycling Team','AA Drink - Leontien.nl','Team Garmin - Cervelo' } );
INSERT INTO cycling.cyclist_career_teams (id,lastname,teams) VALUES (1c9ebc13-1eab-4ad5-be87-dce433216d40, 'BRAND', { 'Rabobank-Liv Woman Cycling Team','Rabobank-Liv Giant','AA Drink - Leontien.nl','Leontien.nl' } );
INSERT INTO cycling.cyclist_career_teams (
id, lastname, teams
) VALUES (
5b6962dd-3f90-4c93-8f61-eabfa4a803e2,
'VOS',
{
'Rabobank-Liv Woman Cycling Team',
'Rabobank-Liv Giant',
'Rabobank Women Team',
'Nederland bloeit'
}
);
CREATE INDEX IF NOT EXISTS teams_idx ON cycling.cyclist_career_teams (teams);
CREATE CUSTOM INDEX IF NOT EXISTS teams_idx ON cycling.cyclist_career_teams (teams) USING 'StorageAttachedIndex';
DESCRIBE INDEX cycling.teams_idx;
DESCRIBE INDEX cycling.teams_idx;
DROP INDEX IF EXISTS cycling.teams_idx;
SELECT * FROM cycling.cyclist_career_teams;
SELECT * FROM cycling.cyclist_career_teams;
SELECT lastname, teams FROM cycling.cyclist_career_teams
WHERE teams CONTAINS 'Rabobank-Liv Giant';
SELECT lastname, teams FROM cycling.cyclist_career_teams
WHERE teams CONTAINS 'Rabobank-Liv Giant';
SELECT id, lastname, teams FROM cycling.cyclist_career_teams
WHERE id = 5b6962dd-3f90-4c93-8f61-eabfa4a803e2;
CREATE TABLE IF NOT EXISTS cycling.cyclist_career_teams (
id UUID PRIMARY KEY,
lastname text,
teams set<text>
);
DESCRIBE TABLE cycling.cyclist_career_teams;
DROP TABLE IF EXISTS cycling.cyclist_career_teams;
UPDATE cycling.cyclist_career_teams
SET teams = teams + {'Team DSB - Ballast Nedam'}
WHERE id = 5b6962dd-3f90-4c93-8f61-eabfa4a803e2;
UPDATE cycling.cyclist_career_teams SET teams = {}
WHERE id = 5b6962dd-3f90-4c93-8f61-eabfa4a803e2;
DELETE teams FROM cycling.cyclist_career_teams
WHERE id = 5b6962dd-3f90-4c93-8f61-eabfa4a803e2;
UPDATE cycling.cyclist_career_teams
SET teams = teams - {'DSB Bank Nederland bloeit'}
WHERE id = 5b6962dd-3f90-4c93-8f61-eabfa4a803e2;