table-race-sponsors

DELETE sponsorship FROM cycling.race_sponsors
  WHERE race_name = 'Giro d''Italia';
INSERT INTO cycling.race_sponsors (
  race_name, sponsorship
) VALUES (
  'Tour de France',
  { 'LCL', 'Carrefour', 'Skoda', 'Vittel', 'Krys' }
);

INSERT INTO cycling.race_sponsors (
  race_name, sponsorship
) VALUES (
  'Tour de Suisse',
  { 'BMC', 'Tag Heuer', 'Assos' }
);

INSERT INTO cycling.race_sponsors (
  race_name, sponsorship
) VALUES (
  'Criterium du Dauphine',
  { 'LCL', 'Skoda' }
);

INSERT INTO cycling.race_sponsors (
  race_name, sponsorship
) VALUES (
  'Giro d''Italia',
  { 'Castrelli', 'Tag Heuer', 'Alfa Romeo', 'Unibet', 'Pinarello', 'Selle Italia',  'Rovagnati', 'Scrigno' }
);
INSERT INTO cycling.race_sponsors (
  race_year, race_name, sponsorship
) VALUES (
  2018, 'Tour de France',
  [ 'LCL', 'Carrefour', 'Skoda', 'Vittel', 'Krys' ]
);
DELETE sponsorship[2] FROM cycling.race_sponsors
  WHERE race_year = 2018 AND race_name = 'Tour de France';
CREATE INDEX sponsorship_idx ON cycling.race_sponsors (sponsorship);
CREATE CUSTOM INDEX sponsorship_idx ON cycling.race_sponsors (sponsorship)
  USING 'StorageAttachedIndex';
DESCRIBE INDEX cycling.sponsorship_idx;
DESCRIBE INDEX cycling.sponsorship_idx;
SELECT * FROM cycling.race_sponsors;
SELECT * FROM cycling.race_sponsors;
SELECT * FROM cycling.race_sponsors;
SELECT * FROM cycling.race_sponsors WHERE sponsorship CONTAINS 'Carrefour';
SELECT * FROM cycling.race_sponsors WHERE sponsorship CONTAINS 'Carrefour';
CREATE TABLE IF NOT EXISTS cycling.race_sponsors (
  race_name text PRIMARY KEY,
  sponsorship set<text>
);
CREATE TABLE IF NOT EXISTS cycling.race_sponsors (
  race_year int,
  race_name text,
  sponsorship list<text>,
  PRIMARY KEY (race_year, race_name)
);
DESCRIBE TABLE cycling.race_sponsors;
DESCRIBE TABLE cycling.birthday_list;
DROP TABLE IF EXISTS cycling.race_sponsors;
DROP TABLE IF EXISTS cycling.race_sponsors;

Was this helpful?

Give Feedback

How can we improve the documentation?

© 2024 DataStax | Privacy policy | Terms of use

Apache, Apache Cassandra, Cassandra, Apache Tomcat, Tomcat, Apache Lucene, Apache Solr, Apache Hadoop, Hadoop, Apache Pulsar, Pulsar, Apache Spark, Spark, Apache TinkerPop, TinkerPop, Apache Kafka and Kafka are either registered trademarks or trademarks of the Apache Software Foundation or its subsidiaries in Canada, the United States and/or other countries. Kubernetes is the registered trademark of the Linux Foundation.

General Inquiries: +1 (650) 389-6000, info@datastax.com