Skip to content

Commit eb1c523

Browse files
committed
add formatting results
1 parent 7a84e8a commit eb1c523

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed
+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
SELECT CASE WHEN c>(SELECT avg(c) FROM t1) THEN a*2 ELSE b*10 END,
2+
b-c,
3+
a,
4+
(a+b+c+d+e)/5,
5+
c,
6+
a+b*2
7+
FROM t1
8+
WHERE d>e AND EXISTS(SELECT 1 FROM t1 AS x WHERE x.b<t1.b)
9+
ORDER BY 6,1,4,2,5,3
+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
SELECT d-e,
2+
c,
3+
a+b*2+c*3,
4+
b,
5+
abs(a),
6+
CASE WHEN a<b-3 THEN 111
7+
WHEN a<=b THEN 222
8+
WHEN a<b+3 THEN 333 ELSE 444 END,
9+
a+b*2+c*3+d*4+e*5
10+
FROM t1
11+
WHERE (e>c
12+
OR e<d)
13+
AND d>e AND c>d
14+
ORDER BY 3,5,1,2,4,6,7

0 commit comments

Comments
 (0)