blob: b210fa7cafb16be7f9ddef704a728ed758d5aca8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
|
foo;
foo;
# dialect: snowflake
foo + "bar".baz;
FOO + "bar".BAZ;
SELECT a FROM x;
SELECT a FROM x;
# dialect: snowflake
SELECT A FROM X;
SELECT A FROM X;
SELECT "A" FROM "X";
SELECT "A" FROM "X";
SELECT a AS A FROM x;
SELECT a AS a FROM x;
# dialect: snowflake
SELECT A AS a FROM X;
SELECT A AS A FROM X;
SELECT * FROM x;
SELECT * FROM x;
SELECT A FROM x;
SELECT a FROM x;
# dialect: snowflake
SELECT a FROM X;
SELECT A FROM X;
SELECT a FROM X;
SELECT a FROM x;
# dialect: snowflake
SELECT A FROM x;
SELECT A FROM X;
SELECT A AS A FROM (SELECT a AS A FROM x);
SELECT a AS a FROM (SELECT a AS a FROM x);
SELECT a AS B FROM x ORDER BY B;
SELECT a AS b FROM x ORDER BY b;
SELECT A FROM x ORDER BY A;
SELECT a FROM x ORDER BY a;
SELECT A AS B FROM X GROUP BY A HAVING SUM(B) > 0;
SELECT a AS b FROM x GROUP BY a HAVING SUM(b) > 0;
SELECT A AS B, SUM(B) AS C FROM X GROUP BY A HAVING C > 0;
SELECT a AS b, SUM(b) AS c FROM x GROUP BY a HAVING c > 0;
SELECT A FROM X UNION SELECT A FROM X;
SELECT a FROM x UNION SELECT a FROM x;
SELECT A AS A FROM X UNION SELECT A AS A FROM X;
SELECT a AS a FROM x UNION SELECT a AS a FROM x;
(SELECT A AS A FROM X);
(SELECT a AS a FROM x);
# dialect: snowflake
SELECT a /* sqlglot.meta case_sensitive */, b FROM table /* sqlglot.meta case_sensitive */;
SELECT a /* sqlglot.meta case_sensitive */, B FROM table /* sqlglot.meta case_sensitive */;
# dialect: redshift
SELECT COALESCE(json_val.a /* sqlglot.meta case_sensitive */, json_val.A /* sqlglot.meta case_sensitive */) FROM tbl;
SELECT COALESCE(json_val.a /* sqlglot.meta case_sensitive */, json_val.A /* sqlglot.meta case_sensitive */) FROM tbl;
SELECT @X;
SELECT @X;
|