Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Final test
--PostgreSQL 9.6 --'\\' is a delimiter CREATE SCHEMA erp; CREATE TABLE erp.orders( id integer PRIMARY KEY, userId integer, paidAt timestamp DEFAULT current_timestamp ); CREATE SCHEMA prod; CREATE TABLE prod.referral_order_delivered( user_id integer ); INSERT INTO erp.orders VALUES ('374893429','1','2017-06-30' ), ('23718932','1','2017-06-18' ), ('23892031','2','2017-06-07' ), ('283238321','4','2017-06-07' ), ('8323218','3','2017-01-01' ), ('2819','2','2017-01-01' ), ('2383','2','2017-01-01' ), ('21839','2','2017-01-01' ) ; INSERT INTO prod.referral_order_delivered VALUES ('1' ), ('2'), ('1' ), ('1' ), ('1' ) ; --PUT YOUR REQUEST HERE
run
|
edit
|
history
|
help
0
finale47394372
SQL - Unpivot Table
Professional Networking Social Media Website SQL Analysis
librarayv2
Atuação
FinaleNFJNDFJKSN
PostreSQL: Right Outer Join
PostgreSQL: CASE
finaleHFEIZFIDSHI
Yandex Task