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;