-
Notifications
You must be signed in to change notification settings - Fork 58
/
subquery.txt
46 lines (43 loc) · 1.07 KB
/
subquery.txt
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
================================================================================
Can parse subquery
================================================================================
SELECT id
FROM foo
WHERE id < (
SELECT id
FROM bar
LIMIT 1);
--------------------------------------------------------------------------------
(program
(statement
(select
(keyword_select)
(select_expression
(term
(field
(identifier)))))
(from
(keyword_from)
(relation
(object_reference
(identifier)))
(where
(keyword_where)
(binary_expression
(field
(identifier))
(subquery
(select
(keyword_select)
(select_expression
(term
(field
(identifier)))))
(from
(keyword_from)
(relation
(object_reference
(identifier)))
(limit
(keyword_limit)
(literal)))))))))