Skip to content

Commit fe4ecab

Browse files
committed
add a temp chart examples
1 parent 600fb26 commit fe4ecab

3 files changed

Lines changed: 30 additions & 0 deletions

File tree

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ A sophisticated Neovim plugin provides an IDE-like experience for SQL developmen
5252

5353
![Description](docs/images/screenshot-20250920-210319.png)
5454

55+
![Description](docs/images/screenshot-20251011-204209.png)
56+
5557
```vim
5658
" Execute queries directly from Neovim with intelligent features:
5759
" - Visual selection execution
74.9 KB
Loading

examples/temp_chart.sql

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
WITH
2+
centigrade AS (
3+
SELECT value AS deg_c
4+
FROM RANGE(0, 100, 2)
5+
),
6+
temp_chart AS (
7+
SELECT
8+
deg_c,
9+
ROUND(CONVERT(deg_c, 'celsius', 'fahrenheit'), 2) AS deg_f,
10+
ROUND(CONVERT(deg_c, 'celsius', 'kelvin'), 2) AS deg_k
11+
FROM centigrade
12+
)
13+
SELECT
14+
*,
15+
CASE deg_c
16+
WHEN 0 THEN 'freezing point water'
17+
WHEN 4 THEN 'max density water'
18+
WHEN 20 THEN 'room temperature'
19+
WHEN 36 THEN 'human body temp (avg)'
20+
WHEN 37 THEN 'human body temp'
21+
WHEN 38 THEN 'mild fever'
22+
WHEN 56 THEN 'pasteurization temp'
23+
WHEN 78 THEN 'ethanol boiling point'
24+
WHEN 100 THEN 'boiling point water'
25+
ELSE ''
26+
END AS notable_temp
27+
FROM temp_chart;
28+

0 commit comments

Comments
 (0)