Skip to content

Commit 60b6162

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent ddb2600 commit 60b6162

File tree

2 files changed

+17
-17
lines changed

2 files changed

+17
-17
lines changed

README.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -174,26 +174,26 @@ ORDER BY
174174
To count the spend for a category (ex: "Apps") between this month and the next 11 months (inclusive):
175175

176176
```sql
177-
select
177+
SELECT
178178
budget_id
179-
, sum(amount_major)
180-
from (
181-
select
179+
, SUM(amount_major)
180+
FROM (
181+
SELECT
182182
budget_id
183183
, amount_major
184-
from flat_transactions
185-
where
184+
FROM flat_transactions
185+
WHERE
186186
category_name = 'Apps'
187-
and substr(`date`, 1, 7) = substr(date(), 1, 7) and not deleted
188-
union all
189-
select
187+
AND SUBSTR(`date`, 1, 7) = SUBSTR(DATE(), 1, 7) AND NOT deleted
188+
UNION ALL
189+
SELECT
190190
budget_id
191191
, amount_major
192-
from scheduled_flat_transactions
193-
where
192+
FROM scheduled_flat_transactions
193+
WHERE
194194
category_name = 'Apps'
195-
and not deleted
196-
and substr(date_next, 1, 7) < substr(date('now', '+1 year'), 1, 7)
195+
AND NOT deleted
196+
AND SUBSTR(date_next, 1, 7) < SUBSTR(DATE('now', '+1 year'), 1, 7)
197197
)
198198
;
199199
```

pyproject.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,6 @@ extend-select = [
3434
line_position = "leading"
3535
spacing_before = "touch"
3636

37-
[tool.sqlfluff.rules.convention.terminator]
38-
multiline_newline = true
39-
require_final_semicolon = true
40-
4137
[tool.sqlfluff.rules.capitalisation.functions]
4238
extended_capitalisation_policy = 'upper'
4339

@@ -46,3 +42,7 @@ extended_capitalisation_policy = 'lower'
4642

4743
[tool.sqlfluff.rules.capitalisation.keywords]
4844
capitalisation_policy = 'upper'
45+
46+
[tool.sqlfluff.rules.convention.terminator]
47+
multiline_newline = true
48+
require_final_semicolon = true

0 commit comments

Comments
 (0)