Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Leet Code 185
--PostgreSQL 9.6 --'\\' is a delimiter drop table if exists Employee; drop table if exists Department; create table Employee("id" int, "name" varchar(30), "salary" int, "departmentid" int); create table Department("id" int, "name" varchar(30)); insert into Employee ("id", "name", "salary", "departmentid") values (1, 'Joe', 85000, 1), (2, 'Henry', 80000, 2), (3, 'Sam', 60000, 2), (4,'Max', 90000, 1), (5, 'Janet', 69000, 1), (6, 'Randy', 85000, 1), (7, 'Will', 70000, 1); insert into Department ("id", "name") values (1, 'IT'), (2, 'Sales');
run
|
edit
|
history
|
help
0
JieShenLaiOfferSQL
CALCULATOR USING PL/PGSQL FUNCTIONS
Recursive inefficiency
Distinct row aggregation with ordering - stackoverflow.com/q/43249053/4116017
Timestamps in PostgreSQL
w3c sql data
conditionally add “another row” in SQL Server?
simple add function on sql
PostgreSQL pivot using temp view
timestamp sample