forked from jprante/elasticsearch-jdbc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mysql-demo.sql
68 lines (53 loc) · 2.51 KB
/
mysql-demo.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
create database if not exists test default character set utf8;
use test;
drop table if exists employees;
create table employees (
name varchar(32),
department varchar(32),
salary varchar(32)
);
drop table if exists departments;
create table departments (
name varchar(32),
country varchar(32)
);
drop table if exists customers;
create table customers (
name varchar(32),
country varchar(32)
);
drop table if exists products;
create table products (
name varchar(32),
amount int(11),
price varchar(32)
);
drop table if exists orders;
create table orders (
customer varchar(32),
department varchar(32),
product varchar(32),
quantity int(11),
created datetime NOT NULL DEFAULT '0000-00-00 00:00:00'
);
insert into employees (name, department, salary) values('Smith', 'American Fruits', '10,000 $');
insert into employees (name, department, salary) values('Jones', 'English Fruits', '6,000 £');
insert into employees (name, department, salary) values('Müller', 'German Fruits', '8,000 €');
insert into employees (name, department, salary) values('Meier', 'German Fruits', '7,000 €');
insert into employees (name, department, salary) values('Schulze', 'German Fruits', '6,000 €');
insert into departments (name, country) values('American Fruits', 'us');
insert into departments (name, country) values('English Fruits', 'en');
insert into departments (name, country) values('German Fruits', 'de');
insert into customers (name, country) values('Big', 'us');
insert into customers (name, country) values('Large', 'en');
insert into customers (name, country) values('Huge', 'en');
insert into customers (name, country) values('Good', 'de');
insert into customers (name, country) values('Bad', 'de');
insert into products (name, amount, price) values('Apples', 2, '1,00$');
insert into products (name, amount, price) values('Bananas', 3, '2,00$');
insert into products (name, amount, price) values('Oranges', 5, '3,00$');
insert into orders (customer, department, product, quantity) values('Big', 'American Fruits', 'Apples', 1);
insert into orders (customer, department, product, quantity) values('Large', 'German Fruits', 'Bananas', 1);
insert into orders (customer, department, product, quantity) values('Huge', 'German Fruits', 'Oranges', 2);
insert into orders (customer, department, product, quantity, created) values('Good', 'German Fruits', 'Apples', 2, '2012-06-01');
insert into orders (customer, department, product, quantity, created) values('Bad', 'English Fruits', 'Oranges', 3, '2012-06-01');