table-cyclist-points

INSERT INTO cycling.cyclist_points (
  id,race_points,firstname,lastname,race_title
) VALUES (
  e3b19ec4-774a-4d1c-9e5a-decec1e30aac, 6, 'Giorgia', 'BRONZINI', 'Trofeo Alfredo Binda - Commune di Cittiglio'
);

INSERT INTO cycling.cyclist_points (
  id,race_points,firstname,lastname,race_title
) VALUES (
  e3b19ec4-774a-4d1c-9e5a-decec1e30aac, 75, 'Giorgia', 'BRONZINI', 'Act van Westerveld'
);

INSERT INTO cycling.cyclist_points (
  id,race_points,firstname,lastname,race_title
) VALUES (
  e3b19ec4-774a-4d1c-9e5a-decec1e30aac, 120, 'Giorgia', 'BRONZINI', 'Tour of Chongming Island World Cup'
);
SELECT * FROM cycling.cyclist_points;
SELECT AVG(race_points) FROM cycling.cyclist_points
  WHERE id = e3b19ec4-774a-4d1c-9e5a-decec1e30aac;
SELECT MAX(race_points) FROM cycling.cyclist_points
  WHERE id = e3b19ec4-774a-4d1c-9e5a-decec1e30aac;
SELECT MIN(race_points) FROM cycling.cyclist_points
  WHERE id = e3b19ec4-774a-4d1c-9e5a-decec1e30aac;
SELECT SUM(race_points) FROM cycling.cyclist_points
  WHERE id = e3b19ec4-774a-4d1c-9e5a-decec1e30aac AND race_points > 7;
SELECT MAXWRITETIME (race_title) FROM cycling.cyclist_points;
SELECT SUM(race_points) FROM cycling.cyclist_points
  WHERE id = e3b19ec4-774a-4d1c-9e5a-decec1e30aac;
SELECT WRITETIME (firstname) FROM cycling.cyclist_points
  WHERE id = e3b19ec4-774a-4d1c-9e5a-decec1e30aac;
CREATE TABLE IF NOT EXISTS cycling.cyclist_points (
  id UUID,
  race_points int,
  firstname text,
  lastname text,
  race_title text,
  PRIMARY KEY (id, race_points)
);
DESCRIBE TABLE cycling.cyclist_points;
DROP TABLE IF EXISTS cycling.cyclist_points;

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