Important
Self-managed SingleStore will soon transition from version 9.1 RC to version 10. This new semantic versioning scheme will provide SingleStore with finer control over engine and feature releases that were not possible with the current versioning scheme.
In the interim, SingleStore 9.1 RC can be used to preview, evaluate, and provide feedback on the new and upcoming features in SingleStore 10 prior to its general availability. Ahead of this transition, SingleStore 9.0 is recommended for production workloads, which can later be upgraded to SingleStore 10.
Create Database and Tables
Connect to your SingleStore deployment and run the following SQL commands to create a database named trades and two associated tables.
Note
The SQL Editor only runs the queries that you select, so ensure you have them all selected before selecting Run.
DROP DATABASE IF EXISTS trades;CREATE DATABASE trades;USE trades;CREATE TABLE company (symbol char(5) COLLATE utf8mb4_bin NOT NULL,name varchar(500) COLLATE utf8mb4_bin DEFAULT NULL,last_sale varchar(10) COLLATE utf8mb4_bin DEFAULT NULL,market_cap varchar(15) COLLATE utf8mb4_bin DEFAULT NULL,IPO_year float DEFAULT NULL,sector varchar(80) COLLATE utf8mb4_bin DEFAULT NULL,industry varchar(80) COLLATE utf8mb4_bin DEFAULT NULL,summary_quote varchar(50) COLLATE utf8mb4_bin DEFAULT NULL,extra varchar(50) COLLATE utf8mb4_bin DEFAULT NULL,SORT KEY __UNORDERED (), SHARD KEY ());CREATE TABLE trade (id bigint(20) NOT NULL,stock_symbol char(5) COLLATE utf8mb4_bin NOT NULL,shares decimal(18,4) NOT NULL,share_price decimal(18,4) NOT NULL,trade_time datetime(6) NOT NULL,SORT KEY stock_symbol (stock_symbol),SHARD KEY __SHARDKEY (stock_symbol));
Last modified: