learn-request-queue/db/90-views.sql

6 lines
191 B
SQL

CREATE VIEW requests_vw AS
SELECT * FROM requests WHERE state = 'Requested' ORDER BY score DESC, id ASC;
CREATE VIEW requests_all_vw AS
SELECT * FROM requests ORDER BY score DESC, id ASC;