PY
py
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
# https://www.sololearn.com/Discuss/3069497/sql-star-schema-queries
'''
copy this code and put in the link
https://paiza.io/en/projects/new?language=mysql
and see the result.
'''
print (
"""
CREATE TABLE DimProduct1 (
Prod_ID INT NOT NULL PRIMARY KEY,
Prod_Name VARCHAR(255) NOT NULL,
Prod_Quantity INT NOT NULL,
Prod_Cost NUMERIC(18,2) NOT NULL );
INSERT INTO DimProduct1 (Prod_ID, Prod_Name, Prod_Quantity, Prod_Cost)
VALUES
(201, 'Hammer', 10, 20.00),
(202, 'Nails', 20, 5.00),
(203, 'Lumber', 50, 5.00),
(204, 'Premium Paintz', 10, 25.00);
Select * From DimProduct1;
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run