Name of SQL programming style where KEYWORDS | CRITERIA are justified to centering line
1
vote
2
answers
57
views
Is there a name for this kind of SQL programming style?
--Courtesy of Markus Winand of modern-sql.com/
SELECT *
FROM (SELECT cities.*
, ROW_NUMBER() OVER(PARTITION BY country ORDER BY population DESC) rn
, COUNT(*) OVER(PARTITION BY country) ct_cities
FROM cities
) t
WHERE t.rn = 1
AND t.ct_cities > 1
Source: [dbfiddle](https://dbfiddle.uk/DK5X59PV) related to this topic: Oracle Idea: FIRST() and LAST() aggregate functions
---------------
It's as if there is a line between the SQL keywords (right-justified) and the criteria (left-justified).
Whereas in other SQL styles, the SQL keywords are left-justified.
-----------------
I ask because that style seems easy to read and I want to find out more about it.
Edit; a related post: SQL Developer - Keep analytic function on single line when auto-formatting

Asked by User1974
(1527 rep)
Mar 16, 2023, 08:08 PM
Last activity: Mar 17, 2023, 02:26 PM
Last activity: Mar 17, 2023, 02:26 PM