Open peterwy opened 6 years ago
-- using Window functions. This is after formatting WITH recentorders AS (SELECT -- this should be indented * FROM ordertable ORDER BY
order_id` DESC
LIMIT 100) -- should be last indented line
SELECT
*
FROM
recentorders;
-- compare a subquery after formatting SELECT FROM (SELECT -- compare: this is indented FROM ordertable DESC LIMIT 100);`
Please ignore the last comment. HTML formatting destroys the point.
The 2 queries to compare in formatter are
WITH recentorders AS (SELECT FROM ordertable ORDER BY order_id
DESC LIMIT 100) SELECT FROM recentorders;
SELECT FROM (SELECT FROM ordertable DESC LIMIT 100);
"Common Table Expressions" require a similar check with the formatter, BTW.
The formatter should indent 'inner SELECTs' like it does with subqueries. Se below:
-- using Window Functions. This is after formatting WITH recentorders AS (SELECT -- this should be indented FROM ordertable ORDER BY
order_id
DESC LIMIT 100) -- should be last indented line SELECTFROM recentorders;
-- compare a subquery after formatting SELECT FROM (SELECT -- compare: this is indented FROM ordertable DESC LIMIT 100);