forked from knative/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sample.sql
14 lines (13 loc) · 999 Bytes
/
sample.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
CREATE DATABASE bookstore;
CREATE TABLE IF NOT EXISTS book_reviews(
id SERIAL PRIMARY KEY,
post_time timestamp NOT NULL,
content TEXT NOT NULL,
sentiment TEXT,
CONSTRAINT sentiment_check CHECK (sentiment IN ('positive', 'negative', 'neutral'))
);
INSERT INTO book_reviews (post_time, content, sentiment) VALUES
('2020-01-01 00:00:00', 'This book is great!', 'positive'),
('2020-01-02 00:02:00', 'This book is terrible!', 'negative'),
('2020-01-03 00:01:30', 'This book is okay.', 'neutral'),
('2020-01-04 00:00:00', 'Meh', 'neutral');