Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
select distinct
--PostgreSQL 9.6 --'\\' is a delimiter CREATE SCHEMA erp; CREATE TABLE erp.orders( userId integer, paidat timestamp DEFAULT current_timestamp ); INSERT INTO erp.orders VALUES ('2','2017-01-01' ), ('3','2017-01-01' ), ('2','2017-01-01' ), ('2','2017-01-01' ), ('4','2017-06-07' ), ('2','2017-06-07' ), ('1','2017-06-30' ), ('1','2017-06-18' ) ; select distinct on (erp.orders.userid) erp.orders.userid, paidat from erp.orders order by erp.orders.userid, paidat asc;
run
|
edit
|
history
|
help
0
Game Play Analysis (511,512,534,550)
Q3
Comp
Branch
Distinct row aggregation with ordering - stackoverflow.com/q/43249053/4116017
postgresql select test
Codigo_Completo
Professional Networking Social Media Website SQL Analysis
Professional Networking Social Media Website SQL Analysis
3c